repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: 5e363593d54a351bff762165dd620d50c45c30b9: path_to: revision_to:
commit 5e363593d54a351bff762165dd620d50c45c30b9 Author: Marc LehmannDate: Tue Jan 3 02:42:17 2006 +0000 *** empty log message *** diff --git a/src/rxvtperl.xs b/src/rxvtperl.xs
--- a/src/rxvtperl.xs
+++ b/src/rxvtperl.xs
@@ -365,16 +365,36 @@ GET_BASEBG (int rend)
RETVAL
int
-SET_FGCOLOR (int rend, int color)
+SET_FGCOLOR (int rend, int new_color)
CODE:
- RETVAL = SET_FGCOLOR (rend, color);
+ RETVAL = SET_FGCOLOR (rend, new_color);
OUTPUT:
RETVAL
int
-SET_BGCOLOR (int rend, int color)
+SET_BGCOLOR (int rend, int new_color)
CODE:
- RETVAL = SET_BGCOLOR (rend, color);
+ RETVAL = SET_BGCOLOR (rend, new_color);
+ OUTPUT:
+ RETVAL
+
+int
+GET_CUSTOM (int rend)
+ CODE:
+ RETVAL = (rend && RS_customMask) >> RS_customShift;
+ OUTPUT:
+ RETVAL
+
+int
+SET_CUSTOM (int rend, int new_value)
+ CODE:
+{
+ if (!IN_RANGE_EXC (new_value, 0, RS_customCount))
+ croak ("custom value out of range, must be 0..%d", RS_customCount - 1);
+
+ RETVAL = (rend & ~RS_customMask)
+ | ((new_value << RS_customShift) & RS_customMask);
+}
OUTPUT:
RETVAL
diff --git a/src/urxvt.pm b/src/urxvt.pm
--- a/src/urxvt.pm +++ b/src/urxvt.pm @@ -220,8 +220,8 @@ Return the rendition mask used for overlays by default. =item $rendbit = urxvt::RS_Bold, RS_Italic, RS_Blink, RS_RVid, RS_Uline Return the bit that enabled bold, italic, blink, reverse-video and -underline, respectively. To enable such a style, just or it onto the -bitset. +underline, respectively. To enable such a style, just logically OR it into +the bitset. =item $foreground = urxvt::GET_BASEFG $rend @@ -236,6 +236,16 @@ Return the foreground/background colour index, respectively. Replace the foreground/background colour in the rendition mask with the specified one. +=item $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. + +=item $rend = urxvt::SET_CUSTOM ($rend, $new_value) + +Change the custom value. + =back =cut
-----END OF PAGE-----