aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root>2017-07-13 10:31:27 +0000
committerroot <root>2017-07-13 10:31:27 +0000
commitc6472d758639f57610a3f55f49ee121fbc4eac79 (patch)
treec2dfadd74a6f634409d1dc9f476f1cc229df58bb
parentc9f706a60c61b5bfb4b35f502cd56249b5e65c32 (diff)
downloadrxvt-unicode-c6472d758639f57610a3f55f49ee121fbc4eac79.tar
rxvt-unicode-c6472d758639f57610a3f55f49ee121fbc4eac79.tar.gz
*** empty log message ***
-rw-r--r--Changes3
-rw-r--r--src/rxvtperl.xs32
-rw-r--r--src/urxvt.pm22
3 files changed, 57 insertions, 0 deletions
diff --git a/Changes b/Changes
index 29e8ee5e..2a481e16 100644
--- a/Changes
+++ b/Changes
@@ -39,6 +39,7 @@ TODO: simplify extension metainfo cache, cache on disk
TODO: URxvt::Ext::Name installs urxvt ext name and provides pod/manpage for URxvt::Ext::Name
TODO: ├╝pixel droppins idenrasm,ll,scrollup
TODO: cuu/cud and probably others default to 1 when arg is 0, not just missing, in xterm/vt102, but not in rxvt
+TODO: implement xterms nih 1006 mouse mode because the fud campaign against urxvt's 1015 mode works.
TODO: fix ESC G reply forever, or simply completely disable it?
- improved security: rob nation's (obsolete) graphics mode queries
@@ -56,6 +57,8 @@ TODO: fix ESC G reply forever, or simply completely disable it?
ext if any bg image resource/option is present. The old bg image
resources are also now deprecated; users are encouraged to
switch to the new bg image interface (see man urxvt-background).
+ - expose priv_modes member and constants to perl extensions
+ (patch by Rastislav Barlik).
9.22 Sat Jan 23 21:07:33 CET 2016
- NOTICE: this release updates terminfo.
diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs
index 0489f24e..7f023ecc 100644
--- a/src/rxvtperl.xs
+++ b/src/rxvtperl.xs
@@ -1022,6 +1022,36 @@ BOOT:
const_iv (XIMDontChange),
# endif
# endif
+
+ /* DEC private modes */
+ const_iv (PrivMode_132),
+ const_iv (PrivMode_132OK),
+ const_iv (PrivMode_rVideo),
+ const_iv (PrivMode_relOrigin),
+ const_iv (PrivMode_Screen),
+ const_iv (PrivMode_Autowrap),
+ const_iv (PrivMode_aplCUR),
+ const_iv (PrivMode_aplKP),
+ const_iv (PrivMode_HaveBackSpace),
+ const_iv (PrivMode_BackSpace),
+ const_iv (PrivMode_ShiftKeys),
+ const_iv (PrivMode_VisibleCursor),
+ const_iv (PrivMode_MouseX10),
+ const_iv (PrivMode_MouseX11),
+ const_iv (PrivMode_scrollBar),
+ const_iv (PrivMode_TtyOutputInh),
+ const_iv (PrivMode_Keypress),
+ const_iv (PrivMode_smoothScroll),
+ const_iv (PrivMode_vt52),
+ const_iv (PrivMode_LFNL),
+ const_iv (PrivMode_MouseBtnEvent),
+ const_iv (PrivMode_MouseAnyEvent),
+ const_iv (PrivMode_BracketPaste),
+ const_iv (PrivMode_ExtModeMouse),
+ const_iv (PrivMode_ExtMouseRight),
+ const_iv (PrivMode_BlinkingCursor),
+ const_iv (PrivMode_mouse_report),
+ const_iv (PrivMode_Default),
};
for (civ = const_iv + ecb_array_length (const_iv); civ > const_iv; civ--)
@@ -1422,6 +1452,7 @@ rxvt_term::ModLevel3Mask ()
ModNumLockMask = 2
current_screen = 3
hidden_cursor = 4
+ priv_modes = 5
CODE:
switch (ix)
{
@@ -1434,6 +1465,7 @@ rxvt_term::ModLevel3Mask ()
#else
case 4: RETVAL = 0; break;
#endif
+ case 5: RETVAL = THIS->priv_modes; break;
}
OUTPUT:
RETVAL
diff --git a/src/urxvt.pm b/src/urxvt.pm
index 3dcf7020..816317d4 100644
--- a/src/urxvt.pm
+++ b/src/urxvt.pm
@@ -514,6 +514,18 @@ SelectionNotify, ColormapNotify, ClientMessage, MappingNotify
Various constants for use in X calls and event processing.
+=item urxvt::PrivMode_132, PrivMode_132OK, PrivMode_rVideo, PrivMode_relOrigin,
+PrivMode_Screen, PrivMode_Autowrap, PrivMode_aplCUR, PrivMode_aplKP,
+PrivMode_HaveBackSpace, PrivMode_BackSpace, PrivMode_ShiftKeys,
+PrivMode_VisibleCursor, PrivMode_MouseX10, PrivMode_MouseX11,
+PrivMode_scrollBar, PrivMode_TtyOutputInh, PrivMode_Keypress,
+PrivMode_smoothScroll, PrivMode_vt52, PrivMode_LFNL, PrivMode_MouseBtnEvent,
+PrivMode_MouseAnyEvent, PrivMode_BracketPaste, PrivMode_ExtModeMouse,
+PrivMode_ExtMouseRight, PrivMode_BlinkingCursor, PrivMode_mouse_report,
+PrivMode_Default
+
+Constants for checking DEC private modes.
+
=back
=head2 RENDITION
@@ -1693,6 +1705,16 @@ Returns the currently displayed screen (0 primary, 1 secondary).
Returns whether the cursor is currently hidden or not.
+=item $priv_modes = $term->priv_modes
+
+Returns a bitset with the state of DEC private modes.
+
+Example:
+
+ if ($term->priv_modes & urxvt::PrivMode_mouse_report) {
+ # mouse reporting is turned on
+ }
+
=item $view_start = $term->view_start ([$newvalue])
Returns the row number of the topmost displayed line. Maximum value is