From: root
Date: Wed, 4 Jan 2006 21:37:55 +0000 (+0000)
Subject: *** empty log message ***
X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=710a10153871566b88ce26e63be903bccf037685;p=dana%2Furxvt.git
*** empty log message ***
---
diff --git a/Changes b/Changes
index 984b7075..6cc6e899 100644
--- a/Changes
+++ b/Changes
@@ -7,15 +7,8 @@ TODO: read property sequence is broken with respect to utf-8 etc.
TODO: http://www120.pair.com/mccarthy/nextstep/intro.htmld/Workspace.html is the correct nextstep look.
WISH: OnTheSpot editing, or maybe switch to miiiiiiif
WISH: just for fun, do shade and tint with XRender.
-WISH: make builtin character glyphs optional
-SECURITY FIX: systems using openpty (most BSDs) had wrong permissions on
-the tty. Other systems (such as GNU/Linux) were not affected. Bug fixes:
-the meta8 option ("weird alt key behaviour") is no longer forcefully
-enabled. New features: urxvt now supports embedded perl, which can already
-do useful things and will certainly be extended in the future.
-
-6.3
+6.3 Wed Jan 4 22:37:10 CET 2006
- SECURITY FIX: on systems using openpty, permissions were
not correctly updated on the tty device and were left as
world-readable and world-writable (likely in original rxvt,
diff --git a/README.configure b/README.configure
index ba51acdc..c8694233 100644
--- a/README.configure
+++ b/README.configure
@@ -187,17 +187,21 @@ CONFIGURE OPTIONS
MWM-hints
EWMH-hints (pid, utf8 names) and protocols (ping)
- seperate underline colour
- settable border widths and borderless switch
- settable extra linespacing
+ seperate underline colour (-underlineColor)
+ settable border widths and borderless switch (-w, -b, -bl)
+ settable extra linespacing /-lsp)
iso-14755-2 and -3, and visual feedback
backindex and forwardindex escape sequence
window op and some xterm/OSC escape sequences
- tripleclickwords
- settable insecure mode
+ tripleclickwords (-tcw)
+ settable insecure mode (-insecure)
keysym remapping support
- cursor blinking and underline cursor
- -embed, -pty-fd and -hold options
+ cursor blinking and underline cursor (-cb, -uc)
+ XEmbed support (-embed)
+ user-pty (-pty-fd)
+ hold on exit (-hold)
+ skip builtin block graphics (-sbg)
+ sgr modes 90..97 and 100..107
--enable-iso14755 (default: on)
Enable extended ISO 14755 support (see rxvt(1), or doc/rxvt.1.txt).
diff --git a/doc/rxvt.1.html b/doc/rxvt.1.html
index 6cab21ce..91990388 100644
--- a/doc/rxvt.1.html
+++ b/doc/rxvt.1.html
@@ -268,21 +268,21 @@ section of rxvt(7).
-fb fontlist
-Compile font-styles: The bold font list to use when bold characters are to
-be printed. See resource boldFont for details.
+Compile font-styles: The bold font list to use when bold characters
+are to be printed. See resource boldFont for details.
-fi fontlist
-Compile font-styles: The italic font list to use when italic characters are to
-be printed. See resource italicFont for details.
+Compile font-styles: The italic font list to use when italic
+characters are to be printed. See resource italicFont for details.
-fbi fontlist
-Compile font-styles: The bold italic font list to use when bold
+Compile font-styles: The bold italic font list to use when bold
italic > characters are to be printed. See resource boldItalicFont
for details.
@@ -290,7 +290,7 @@ for details.
-is|+is
-Compile font-styles: Bold/Italic font styles imply high intensity
+Compile font-styles: Bold/Italic font styles imply high intensity
foreground/background (default). See resource intensityStyles for
details.
@@ -417,6 +417,15 @@ if honoured by the WM, the rxvt-unicode window will not have window
decorations; resource borderLess.
+-sbg
+
+
+Compile frills: Disable the usage of the built-in block graphics/line
+drawing characters and just rely on what the specified fonts provide. Use
+this if you have a good font and want to use its block graphic glyphs;
+resource skipBuiltinGlyphs.
+
+
-lsp number
@@ -1110,6 +1119,15 @@ Set MWM hints to request a borderless window, i.e. if honoured by the
WM, the rxvt-unicode window will not have window decorations; option -bl.
+skipBuiltinGlyphs: boolean
+
+
+Compile frills: Disable the usage of the built-in block graphics/line
+drawing characters and just rely on what the specified fonts provide. Use
+this if you have a good font and want to use its block graphic glyphs;
+option -sbg.
+
+
termName: termname
diff --git a/doc/rxvt.1.man.in b/doc/rxvt.1.man.in
index ca41bb9c..5ddf4b11 100644
--- a/doc/rxvt.1.man.in
+++ b/doc/rxvt.1.man.in
@@ -300,20 +300,20 @@ See also the question \*(L"How does rxvt-unicode choose fonts?\*(R" in the \s-1F
section of @@RXVT_NAME@@(7).
.IP "\fB\-fb\fR \fIfontlist\fR" 4
.IX Item "-fb fontlist"
-Compile font\-styles: The bold font list to use when \fBbold\fR characters are to
-be printed. See resource \fBboldFont\fR for details.
+Compile \fIfont-styles\fR: The bold font list to use when \fBbold\fR characters
+are to be printed. See resource \fBboldFont\fR for details.
.IP "\fB\-fi\fR \fIfontlist\fR" 4
.IX Item "-fi fontlist"
-Compile font\-styles: The italic font list to use when \fIitalic\fR characters are to
-be printed. See resource \fBitalicFont\fR for details.
+Compile \fIfont-styles\fR: The italic font list to use when \fIitalic\fR
+characters are to be printed. See resource \fBitalicFont\fR for details.
.IP "\fB\-fbi\fR \fIfontlist\fR" 4
.IX Item "-fbi fontlist"
-Compile font\-styles: The bold italic font list to use when \fB\f(BIbold
+Compile \fIfont-styles\fR: The bold italic font list to use when \fB\f(BIbold
italic\fB\fR characters are to be printed. See resource \fBboldItalicFont\fR
for details.
.IP "\fB\-is\fR|\fB+is\fR" 4
.IX Item "-is|+is"
-Compile font\-styles: Bold/Italic font styles imply high intensity
+Compile \fIfont-styles\fR: Bold/Italic font styles imply high intensity
foreground/background (default). See resource \fBintensityStyles\fR for
details.
.IP "\fB\-name\fR \fIname\fR" 4
@@ -387,6 +387,12 @@ and \fB\-borderwidth\fR. See resource entry for limits; resource
Compile \fIfrills\fR: Set \s-1MWM\s0 hints to request a borderless window, i.e.
if honoured by the \s-1WM\s0, the rxvt-unicode window will not have window
decorations; resource \fBborderLess\fR.
+.IP "\fB\-sbg\fR" 4
+.IX Item "-sbg"
+Compile \fIfrills\fR: Disable the usage of the built-in block graphics/line
+drawing characters and just rely on what the specified fonts provide. Use
+this if you have a good font and want to use its block graphic glyphs;
+resource \fBskipBuiltinGlyphs\fR.
.IP "\fB\-lsp\fR \fInumber\fR" 4
.IX Item "-lsp number"
Compile \fIfrills\fR: Lines (pixel height) to insert between each row of
@@ -865,6 +871,12 @@ option \fB\-w\fR, \fB\-bw\fR, \fB\-borderwidth\fR.
.IX Item "borderLess: boolean"
Set \s-1MWM\s0 hints to request a borderless window, i.e. if honoured by the
\&\s-1WM\s0, the rxvt-unicode window will not have window decorations; option \fB\-bl\fR.
+.IP "\fBskipBuiltinGlyphs:\fR \fIboolean\fR" 4
+.IX Item "skipBuiltinGlyphs: boolean"
+Compile \fIfrills\fR: Disable the usage of the built-in block graphics/line
+drawing characters and just rely on what the specified fonts provide. Use
+this if you have a good font and want to use its block graphic glyphs;
+option \fB\-sbg\fR.
.IP "\fBtermName:\fR \fItermname\fR" 4
.IX Item "termName: termname"
Specifies the terminal type name to be set in the \fB\s-1TERM\s0\fR environment
diff --git a/doc/rxvt.1.txt b/doc/rxvt.1.txt
index f9703e1e..3ad294b0 100644
--- a/doc/rxvt.1.txt
+++ b/doc/rxvt.1.txt
@@ -165,20 +165,20 @@ OPTIONS
FAQ section of rxvt(7).
-fb *fontlist*
- Compile font-styles: The bold font list to use when bold characters
- are to be printed. See resource boldFont for details.
+ Compile *font-styles*: The bold font list to use when bold
+ characters are to be printed. See resource boldFont for details.
-fi *fontlist*
- Compile font-styles: The italic font list to use when *italic*
+ Compile *font-styles*: The italic font list to use when *italic*
characters are to be printed. See resource italicFont for details.
-fbi *fontlist*
- Compile font-styles: The bold italic font list to use when *bold
+ Compile *font-styles*: The bold italic font list to use when *bold
italic* characters are to be printed. See resource boldItalicFont
for details.
-is|+is
- Compile font-styles: Bold/Italic font styles imply high intensity
+ Compile *font-styles*: Bold/Italic font styles imply high intensity
foreground/background (default). See resource intensityStyles for
details.
@@ -254,6 +254,12 @@ OPTIONS
if honoured by the WM, the rxvt-unicode window will not have window
decorations; resource borderLess.
+ -sbg
+ Compile *frills*: Disable the usage of the built-in block
+ graphics/line drawing characters and just rely on what the specified
+ fonts provide. Use this if you have a good font and want to use its
+ block graphic glyphs; resource skipBuiltinGlyphs.
+
-lsp *number*
Compile *frills*: Lines (pixel height) to insert between each row of
the display. Useful to work around font rendering problems; resource
@@ -713,6 +719,12 @@ RESOURCES (available also as long-options)
the WM, the rxvt-unicode window will not have window decorations;
option -bl.
+ skipBuiltinGlyphs: *boolean*
+ Compile *frills*: Disable the usage of the built-in block
+ graphics/line drawing characters and just rely on what the specified
+ fonts provide. Use this if you have a good font and want to use its
+ block graphic glyphs; option -sbg.
+
termName: *termname*
Specifies the terminal type name to be set in the TERM environment
variable; option -tn.
diff --git a/doc/rxvt.7.html b/doc/rxvt.7.html
index 74308f3b..e9ec5875 100644
--- a/doc/rxvt.7.html
+++ b/doc/rxvt.7.html
@@ -2934,17 +2934,21 @@ in combination with other switches) is:
MWM-hints
EWMH-hints (pid, utf8 names) and protocols (ping)
- seperate underline colour
- settable border widths and borderless switch
- settable extra linespacing
+ seperate underline colour (-underlineColor)
+ settable border widths and borderless switch (-w, -b, -bl)
+ settable extra linespacing /-lsp)
iso-14755-2 and -3, and visual feedback
backindex and forwardindex escape sequence
window op and some xterm/OSC escape sequences
- tripleclickwords
- settable insecure mode
+ tripleclickwords (-tcw)
+ settable insecure mode (-insecure)
keysym remapping support
- cursor blinking and underline cursor
- -embed, -pty-fd and -hold options
+ cursor blinking and underline cursor (-cb, -uc)
+ XEmbed support (-embed)
+ user-pty (-pty-fd)
+ hold on exit (-hold)
+ skip builtin block graphics (-sbg)
+ sgr modes 90..97 and 100..107
--enable-iso14755 (default: on)
diff --git a/doc/rxvt.7.man.in b/doc/rxvt.7.man.in
index 43c86641..62817ed7 100644
--- a/doc/rxvt.7.man.in
+++ b/doc/rxvt.7.man.in
@@ -129,7 +129,7 @@
.\" ========================================================================
.\"
.IX Title "rxvt 7"
-.TH rxvt 7 "2006-01-04" "6.2" "RXVT-UNICODE"
+.TH rxvt 7 "2006-01-04" "6.3" "RXVT-UNICODE"
.SH "NAME"
RXVT REFERENCE \- FAQ, command sequences and other background information
.SH "SYNOPSIS"
@@ -2479,20 +2479,24 @@ disable this.
A non-exhaustive list of features enabled by \f(CW\*(C`\-\-enable\-frills\*(C'\fR (possibly
in combination with other switches) is:
.Sp
-.Vb 13
+.Vb 17
\& MWM-hints
\& EWMH-hints (pid, utf8 names) and protocols (ping)
-\& seperate underline colour
-\& settable border widths and borderless switch
-\& settable extra linespacing
+\& seperate underline colour (-underlineColor)
+\& settable border widths and borderless switch (-w, -b, -bl)
+\& settable extra linespacing /-lsp)
\& iso-14755-2 and -3, and visual feedback
\& backindex and forwardindex escape sequence
\& window op and some xterm/OSC escape sequences
-\& tripleclickwords
-\& settable insecure mode
+\& tripleclickwords (-tcw)
+\& settable insecure mode (-insecure)
\& keysym remapping support
-\& cursor blinking and underline cursor
-\& -embed, -pty-fd and -hold options
+\& cursor blinking and underline cursor (-cb, -uc)
+\& XEmbed support (-embed)
+\& user-pty (-pty-fd)
+\& hold on exit (-hold)
+\& skip builtin block graphics (-sbg)
+\& sgr modes 90..97 and 100..107
.Ve
.IP "\-\-enable\-iso14755 (default: on)" 4
.IX Item "--enable-iso14755 (default: on)"
diff --git a/doc/rxvt.7.txt b/doc/rxvt.7.txt
index b2300dfb..545b8104 100644
--- a/doc/rxvt.7.txt
+++ b/doc/rxvt.7.txt
@@ -1948,17 +1948,21 @@ CONFIGURE OPTIONS
MWM-hints
EWMH-hints (pid, utf8 names) and protocols (ping)
- seperate underline colour
- settable border widths and borderless switch
- settable extra linespacing
+ seperate underline colour (-underlineColor)
+ settable border widths and borderless switch (-w, -b, -bl)
+ settable extra linespacing /-lsp)
iso-14755-2 and -3, and visual feedback
backindex and forwardindex escape sequence
window op and some xterm/OSC escape sequences
- tripleclickwords
- settable insecure mode
+ tripleclickwords (-tcw)
+ settable insecure mode (-insecure)
keysym remapping support
- cursor blinking and underline cursor
- -embed, -pty-fd and -hold options
+ cursor blinking and underline cursor (-cb, -uc)
+ XEmbed support (-embed)
+ user-pty (-pty-fd)
+ hold on exit (-hold)
+ skip builtin block graphics (-sbg)
+ sgr modes 90..97 and 100..107
--enable-iso14755 (default: on)
Enable extended ISO 14755 support (see rxvt(1), or doc/rxvt.1.txt).
diff --git a/doc/rxvtperl.3.html b/doc/rxvtperl.3.html
index 04d1386c..63a29d3c 100644
--- a/doc/rxvtperl.3.html
+++ b/doc/rxvtperl.3.html
@@ -427,6 +427,20 @@ list:
utmpInhibit visualBell
+$rend = $term->screen_rstyle ([$new_rstyle])
+
+
+Return and optionally change the current rendition. Text thta is output by
+the temrianl application will use this style.
+
+
+($row, $col) = $term->screen_cur ([$row, $col])
+
+
+Return the current coordinates of the text cursor position and optionally
+set it (which is usually bad as applications don't expect that).
+
+
($row, $col) = $term->selection_mark ([$row, $col])
($row, $col) = $term->selection_beg ([$row, $col])
@@ -550,19 +564,32 @@ pass characters instead of octets, you should convert your strings first
to the locale-specific encoding using $term->locale_encode
.
-$nrow = $term->nrow
+$window_width = $term->width
-$ncol = $term->ncol
+$window_height = $term->height
-
-Return the number of rows/columns of the terminal window (i.e. as
-specified by -geometry
, excluding any scrollback).
-
-
-$nsaved = $term->nsaved
+$font_width = $term->fwidth
+
+$font_height = $term->fheight
+
+$font_ascent = $term->fbase
+
+$terminal_rows = $term->nrow
+
+$terminal_columns = $term->ncol
+
+$has_focus = $term->focus
+
+$is_mapped = $term->mapped
+
+$max_scrollback = $term->saveLines
+
+$nrow_plus_saveLines = $term->total_rows
+
+$lines_in_scrollback = $term->nsaved
-Returns the number of lines in the scrollback buffer.
+Return various integers describing terminal characteristics.
$view_start = $term->view_start ([$newvalue])
diff --git a/doc/rxvtperl.3.man.in b/doc/rxvtperl.3.man.in
index cda1e05f..4b27e9cd 100644
--- a/doc/rxvtperl.3.man.in
+++ b/doc/rxvtperl.3.man.in
@@ -445,6 +445,16 @@ list:
\& shade term_name title transparent transparent_all tripleclickwords
\& utmpInhibit visualBell
.Ve
+.ie n .IP "$rend = $term\->screen_rstyle ([$new_rstyle])" 4
+.el .IP "$rend = \f(CW$term\fR\->screen_rstyle ([$new_rstyle])" 4
+.IX Item "$rend = $term->screen_rstyle ([$new_rstyle])"
+Return and optionally change the current rendition. Text thta is output by
+the temrianl application will use this style.
+.ie n .IP "($row, $col\fR) = \f(CW$term\fR\->screen_cur ([$row, \f(CW$col])" 4
+.el .IP "($row, \f(CW$col\fR) = \f(CW$term\fR\->screen_cur ([$row, \f(CW$col\fR])" 4
+.IX Item "($row, $col) = $term->screen_cur ([$row, $col])"
+Return the current coordinates of the text cursor position and optionally
+set it (which is usually bad as applications don't expect that).
.ie n .IP "($row, $col\fR) = \f(CW$term\fR\->selection_mark ([$row, \f(CW$col])" 4
.el .IP "($row, \f(CW$col\fR) = \f(CW$term\fR\->selection_mark ([$row, \f(CW$col\fR])" 4
.IX Item "($row, $col) = $term->selection_mark ([$row, $col])"
@@ -545,20 +555,45 @@ Convert the given locale-encoded octets into a perl string.
Write the octets given in \f(CW$data\fR to the tty (i.e. as program input). To
pass characters instead of octets, you should convert your strings first
to the locale-specific encoding using \f(CW\*(C`$term\->locale_encode\*(C'\fR.
-.ie n .IP "$nrow = $term\->nrow" 4
-.el .IP "$nrow = \f(CW$term\fR\->nrow" 4
-.IX Item "$nrow = $term->nrow"
+.ie n .IP "$window_width = $term\->width" 4
+.el .IP "$window_width = \f(CW$term\fR\->width" 4
+.IX Item "$window_width = $term->width"
.PD 0
-.ie n .IP "$ncol = $term\->ncol" 4
-.el .IP "$ncol = \f(CW$term\fR\->ncol" 4
-.IX Item "$ncol = $term->ncol"
+.ie n .IP "$window_height = $term\->height" 4
+.el .IP "$window_height = \f(CW$term\fR\->height" 4
+.IX Item "$window_height = $term->height"
+.ie n .IP "$font_width = $term\->fwidth" 4
+.el .IP "$font_width = \f(CW$term\fR\->fwidth" 4
+.IX Item "$font_width = $term->fwidth"
+.ie n .IP "$font_height = $term\->fheight" 4
+.el .IP "$font_height = \f(CW$term\fR\->fheight" 4
+.IX Item "$font_height = $term->fheight"
+.ie n .IP "$font_ascent = $term\->fbase" 4
+.el .IP "$font_ascent = \f(CW$term\fR\->fbase" 4
+.IX Item "$font_ascent = $term->fbase"
+.ie n .IP "$terminal_rows = $term\->nrow" 4
+.el .IP "$terminal_rows = \f(CW$term\fR\->nrow" 4
+.IX Item "$terminal_rows = $term->nrow"
+.ie n .IP "$terminal_columns = $term\->ncol" 4
+.el .IP "$terminal_columns = \f(CW$term\fR\->ncol" 4
+.IX Item "$terminal_columns = $term->ncol"
+.ie n .IP "$has_focus = $term\->focus" 4
+.el .IP "$has_focus = \f(CW$term\fR\->focus" 4
+.IX Item "$has_focus = $term->focus"
+.ie n .IP "$is_mapped = $term\->mapped" 4
+.el .IP "$is_mapped = \f(CW$term\fR\->mapped" 4
+.IX Item "$is_mapped = $term->mapped"
+.ie n .IP "$max_scrollback = $term\->saveLines" 4
+.el .IP "$max_scrollback = \f(CW$term\fR\->saveLines" 4
+.IX Item "$max_scrollback = $term->saveLines"
+.ie n .IP "$nrow_plus_saveLines = $term\->total_rows" 4
+.el .IP "$nrow_plus_saveLines = \f(CW$term\fR\->total_rows" 4
+.IX Item "$nrow_plus_saveLines = $term->total_rows"
+.ie n .IP "$lines_in_scrollback = $term\->nsaved" 4
+.el .IP "$lines_in_scrollback = \f(CW$term\fR\->nsaved" 4
+.IX Item "$lines_in_scrollback = $term->nsaved"
.PD
-Return the number of rows/columns of the terminal window (i.e. as
-specified by \f(CW\*(C`\-geometry\*(C'\fR, excluding any scrollback).
-.ie n .IP "$nsaved = $term\->nsaved" 4
-.el .IP "$nsaved = \f(CW$term\fR\->nsaved" 4
-.IX Item "$nsaved = $term->nsaved"
-Returns the number of lines in the scrollback buffer.
+Return various integers describing terminal characteristics.
.ie n .IP "$view_start = $term\->view_start ([$newvalue])" 4
.el .IP "$view_start = \f(CW$term\fR\->view_start ([$newvalue])" 4
.IX Item "$view_start = $term->view_start ([$newvalue])"
diff --git a/doc/rxvtperl.3.txt b/doc/rxvtperl.3.txt
index 0300df3f..a228b5bd 100644
--- a/doc/rxvtperl.3.txt
+++ b/doc/rxvtperl.3.txt
@@ -267,6 +267,15 @@ DESCRIPTION
shade term_name title transparent transparent_all tripleclickwords
utmpInhibit visualBell
+ $rend = $term->screen_rstyle ([$new_rstyle])
+ Return and optionally change the current rendition. Text thta is
+ output by the temrianl application will use this style.
+
+ ($row, $col) = $term->screen_cur ([$row, $col])
+ Return the current coordinates of the text cursor position and
+ optionally set it (which is usually bad as applications don't expect
+ that).
+
($row, $col) = $term->selection_mark ([$row, $col])
($row, $col) = $term->selection_beg ([$row, $col])
($row, $col) = $term->selection_end ([$row, $col])
@@ -341,13 +350,19 @@ DESCRIPTION
strings first to the locale-specific encoding using
"$term->locale_encode".
- $nrow = $term->nrow
- $ncol = $term->ncol
- Return the number of rows/columns of the terminal window (i.e. as
- specified by "-geometry", excluding any scrollback).
-
- $nsaved = $term->nsaved
- Returns the number of lines in the scrollback buffer.
+ $window_width = $term->width
+ $window_height = $term->height
+ $font_width = $term->fwidth
+ $font_height = $term->fheight
+ $font_ascent = $term->fbase
+ $terminal_rows = $term->nrow
+ $terminal_columns = $term->ncol
+ $has_focus = $term->focus
+ $is_mapped = $term->mapped
+ $max_scrollback = $term->saveLines
+ $nrow_plus_saveLines = $term->total_rows
+ $lines_in_scrollback = $term->nsaved
+ Return various integers describing terminal characteristics.
$view_start = $term->view_start ([$newvalue])
Returns the negative row number of the topmost line. Minimum value
diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs
index 6e92f12f..904ea1bc 100644
--- a/src/rxvtperl.xs
+++ b/src/rxvtperl.xs
@@ -217,15 +217,15 @@ overlay::overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle
text = new text_t *[h];
rend = new rend_t *[h];
-
+
for (int y = 0; y < h; y++)
- {
+ {
text_t *tp = text[y] = new text_t[w];
rend_t *rp = rend[y] = new rend_t[w];
-
+
text_t t0, t1, t2;
rend_t r = rstyle;
-
+
if (border == 2)
{
if (y == 0)
@@ -234,26 +234,26 @@ overlay::overlay (rxvt_term *THIS, int x_, int y_, int w_, int h_, rend_t rstyle
t0 = 0x2551, t1 = 0x0020, t2 = 0x2551;
else
t0 = 0x255a, t1 = 0x2550, t2 = 0x255d;
-
- *tp++ = t0;
+
+ *tp++ = t0;
*rp++ = r;
-
+
for (int x = w - 2; x-- > 0; )
{
*tp++ = t1;
*rp++ = r;
- }
+ }
*tp = t2;
- *rp = r;
+ *rp = r;
}
else
for (int x = w; x-- > 0; )
{
*tp++ = 0x0020;
*rp++ = r;
- }
- }
+ }
+ }
show ();
THIS->want_refresh = 1;
@@ -310,12 +310,12 @@ void overlay::swap ()
{
text_t *t1 = text [y];
rend_t *r1 = rend [y];
-
+
text_t *t2 = ROW(y + ov_y - THIS->view_start).t + ov_x;
rend_t *r2 = ROW(y + ov_y - THIS->view_start).r + ov_x;
for (int x = ov_w; x--; )
- {
+ {
text_t t = *t1; *t1++ = *t2; *t2++ = t;
rend_t r = *r1; *r1++ = *r2; *r2++ = SET_FONT (r, THIS->fontset [GET_STYLE (r)]->find_font (t));
}
@@ -335,7 +335,7 @@ void overlay::set (int x, int y, SV *text, SV *rend)
for (int col = min (wcslen (wtext), w - x - border); col--; )
this->text [y][x + col] = wtext [col];
-
+
free (wtext);
if (rend)
@@ -402,7 +402,7 @@ rxvt_perl_interp::invoke (rxvt_term *term, hook_type htype, ...)
{
if (!perl)
return false;
-
+
if (htype == HOOK_INIT) // first hook ever called
{
term->self = (void *)newSVptr ((void *)term, "urxvt::term");
@@ -646,13 +646,52 @@ rxvt_term::locale_decode (SV *octets)
OUTPUT:
RETVAL
+# very portable, especially on objects as opposed to pods
+#define TERM_OFFSET(sym) (((char *)&((TermWin_t *)0)->sym) - (char *)(TermWin_t *)0)
+
+#define TERM_OFFSET_width TERM_OFFSET(width)
+#define TERM_OFFSET_height TERM_OFFSET(height)
+#define TERM_OFFSET_fwidth TERM_OFFSET(fwidth)
+#define TERM_OFFSET_fheight TERM_OFFSET(fheight)
+#define TERM_OFFSET_fbase TERM_OFFSET(fbase)
+#define TERM_OFFSET_nrow TERM_OFFSET(nrow)
+#define TERM_OFFSET_ncol TERM_OFFSET(ncol)
+#define TERM_OFFSET_focus TERM_OFFSET(focus)
+#define TERM_OFFSET_mapped TERM_OFFSET(mapped)
+#define TERM_OFFSET_saveLines TERM_OFFSET(saveLines)
+#define TERM_OFFSET_total_rows TERM_OFFSET(total_rows)
+#define TERM_OFFSET_nsaved TERM_OFFSET(nsaved)
+
int
-rxvt_term::nsaved ()
+rxvt_term::width ()
+ ALIAS:
+ width = TERM_OFFSET_width
+ height = TERM_OFFSET_height
+ fwidth = TERM_OFFSET_fwidth
+ fheight = TERM_OFFSET_fheight
+ fbase = TERM_OFFSET_fbase
+ nrow = TERM_OFFSET_nrow
+ ncol = TERM_OFFSET_ncol
+ focus = TERM_OFFSET_focus
+ mapped = TERM_OFFSET_mapped
+ saveLines = TERM_OFFSET_saveLines
+ total_rows = TERM_OFFSET_total_rows
+ nsaved = TERM_OFFSET_nsaved
CODE:
- RETVAL = THIS->nsaved;
+ RETVAL = *(int *)((char *)THIS + ix);
OUTPUT:
RETVAL
+U32
+rxvt_term::screen_rstyle (U32 new_rstyle = THIS->screen.s_rstyle)
+ CODE:
+{
+ RETVAL = THIS->screen.s_rstyle;
+ THIS->screen.s_rstyle = new_rstyle;
+}
+ OUTPUT:
+ RETVAL
+
int
rxvt_term::view_start (int newval = -1)
CODE:
@@ -668,20 +707,6 @@ rxvt_term::view_start (int newval = -1)
OUTPUT:
RETVAL
-int
-rxvt_term::nrow ()
- CODE:
- RETVAL = THIS->nrow;
- OUTPUT:
- RETVAL
-
-int
-rxvt_term::ncol ()
- CODE:
- RETVAL = THIS->ncol;
- OUTPUT:
- RETVAL
-
void
rxvt_term::want_refresh ()
CODE:
@@ -854,28 +879,31 @@ rxvt_term::_resource (char *name, int index, SV *newval = 0)
}
void
-rxvt_term::selection_mark (...)
+rxvt_term::cur (...)
PROTOTYPE: $;$$
ALIAS:
- selection_beg = 1
- selection_end = 2
+ screen_cur = 0
+ selection_beg = 1
+ selection_end = 2
+ selection_mark = 3
PPCODE:
{
- row_col_t &sel = ix == 1 ? THIS->selection.beg
- : ix == 2 ? THIS->selection.end
- : THIS->selection.mark;
+ row_col_t &rc = ix == 0 ? THIS->screen.cur
+ : ix == 1 ? THIS->selection.beg
+ : ix == 2 ? THIS->selection.end
+ : THIS->selection.mark;
if (GIMME_V != G_VOID)
{
EXTEND (SP, 2);
- PUSHs (sv_2mortal (newSViv (sel.row)));
- PUSHs (sv_2mortal (newSViv (sel.col)));
+ PUSHs (sv_2mortal (newSViv (rc.row)));
+ PUSHs (sv_2mortal (newSViv (rc.col)));
}
if (items == 3)
{
- sel.row = clamp (SvIV (ST (1)), -THIS->nsaved, THIS->nrow - 1);
- sel.col = clamp (SvIV (ST (2)), 0, THIS->ncol - 1);
+ rc.row = clamp (SvIV (ST (1)), -THIS->nsaved, THIS->nrow - 1);
+ rc.col = clamp (SvIV (ST (2)), 0, THIS->ncol - 1);
if (ix)
THIS->want_refresh = 1;
@@ -906,7 +934,7 @@ rxvt_term::selection (SV *newtext = 0)
THIS->selection.len = wcslen (THIS->selection.text);
}
}
-
+
void
rxvt_term::tt_write (SV *octets)
INIT:
diff --git a/src/urxvt.pm b/src/urxvt.pm
index ae5449c0..10e1878f 100644
--- a/src/urxvt.pm
+++ b/src/urxvt.pm
@@ -489,6 +489,16 @@ sub urxvt::term::resource($$;$) {
goto &urxvt::term::_resource;
}
+=item $rend = $term->screen_rstyle ([$new_rstyle])
+
+Return and optionally change the current rendition. Text thta is output by
+the temrianl application will use this style.
+
+=item ($row, $col) = $term->screen_cur ([$row, $col])
+
+Return the current coordinates of the text cursor position and optionally
+set it (which is usually bad as applications don't expect that).
+
=item ($row, $col) = $term->selection_mark ([$row, $col])
=item ($row, $col) = $term->selection_beg ([$row, $col])
@@ -582,16 +592,31 @@ Write the octets given in C<$data> to the tty (i.e. as program input). To
pass characters instead of octets, you should convert your strings first
to the locale-specific encoding using C<< $term->locale_encode >>.
-=item $nrow = $term->nrow
+=item $window_width = $term->width
+
+=item $window_height = $term->height
+
+=item $font_width = $term->fwidth
+
+=item $font_height = $term->fheight
+
+=item $font_ascent = $term->fbase
+
+=item $terminal_rows = $term->nrow
+
+=item $terminal_columns = $term->ncol
+
+=item $has_focus = $term->focus
+
+=item $is_mapped = $term->mapped
-=item $ncol = $term->ncol
+=item $max_scrollback = $term->saveLines
-Return the number of rows/columns of the terminal window (i.e. as
-specified by C<-geometry>, excluding any scrollback).
+=item $nrow_plus_saveLines = $term->total_rows
-=item $nsaved = $term->nsaved
+=item $lines_in_scrollback = $term->nsaved
-Returns the number of lines in the scrollback buffer.
+Return various integers describing terminal characteristics.
=item $view_start = $term->view_start ([$newvalue])