… | |
… | |
636 | Rs_ext_bwidth, |
636 | Rs_ext_bwidth, |
637 | Rs_int_bwidth, |
637 | Rs_int_bwidth, |
638 | Rs_borderLess, |
638 | Rs_borderLess, |
639 | Rs_lineSpace, |
639 | Rs_lineSpace, |
640 | Rs_cursorUnderline, |
640 | Rs_cursorUnderline, |
|
|
641 | Rs_intensityStyles, |
641 | #endif |
642 | #endif |
642 | #if CURSOR_BLINK |
643 | #if CURSOR_BLINK |
643 | Rs_cursorBlink, |
644 | Rs_cursorBlink, |
644 | #endif |
645 | #endif |
645 | #if ENABLE_XEMBED |
646 | #if ENABLE_XEMBED |
… | |
… | |
826 | #define ROW(n) row_buf [LINENO (n)] |
827 | #define ROW(n) row_buf [LINENO (n)] |
827 | |
828 | |
828 | /* how to build & extract colors and attributes */ |
829 | /* how to build & extract colors and attributes */ |
829 | #define GET_BASEFG(x) (((x) & RS_fgMask)) |
830 | #define GET_BASEFG(x) (((x) & RS_fgMask)) |
830 | #define GET_BASEBG(x) (((x) & RS_bgMask)>>Color_Bits) |
831 | #define GET_BASEBG(x) (((x) & RS_bgMask)>>Color_Bits) |
831 | #ifndef NO_BRIGHTCOLOR |
|
|
832 | # define GET_FGCOLOR(x) \ |
|
|
833 | ((((x) & RS_Bold) == 0 \ |
|
|
834 | || GET_BASEFG (x) < minCOLOR \ |
|
|
835 | || GET_BASEFG (x) >= minBrightCOLOR) \ |
|
|
836 | ? GET_BASEFG (x) \ |
|
|
837 | : (GET_BASEFG (x) + (minBrightCOLOR - minCOLOR))) |
|
|
838 | # define GET_BGCOLOR(x) \ |
|
|
839 | ((((x) & RS_Blink) == 0 \ |
|
|
840 | || GET_BASEBG (x) < minCOLOR \ |
|
|
841 | || GET_BASEBG (x) >= minBrightCOLOR) \ |
|
|
842 | ? GET_BASEBG (x) \ |
|
|
843 | : (GET_BASEBG (x) + (minBrightCOLOR - minCOLOR))) |
|
|
844 | #else |
|
|
845 | # define GET_FGCOLOR(x) GET_BASEFG(x) |
|
|
846 | # define GET_BGCOLOR(x) GET_BASEBG(x) |
|
|
847 | #endif |
|
|
848 | |
832 | |
849 | #define GET_FONT(x) (((x) & RS_fontMask) >> RS_fontShift) |
833 | #define GET_FONT(x) (((x) & RS_fontMask) >> RS_fontShift) |
850 | #define SET_FONT(x,fid) (((x) & ~RS_fontMask) | ((fid) << RS_fontShift)) |
834 | #define SET_FONT(x,fid) (((x) & ~RS_fontMask) | ((fid) << RS_fontShift)) |
851 | |
835 | |
852 | #define GET_STYLE(x) (((x) & RS_styleMask) >> RS_styleShift) |
836 | #define GET_STYLE(x) (((x) & RS_styleMask) >> RS_styleShift) |
… | |
… | |
1261 | // ISO 14755 entry support |
1245 | // ISO 14755 entry support |
1262 | unicode_t iso14755buf; |
1246 | unicode_t iso14755buf; |
1263 | void commit_iso14755 (); |
1247 | void commit_iso14755 (); |
1264 | int hex_keyval (XKeyEvent &ev); |
1248 | int hex_keyval (XKeyEvent &ev); |
1265 | # if ISO_14755 |
1249 | # if ISO_14755 |
1266 | void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE); |
1250 | void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE, int x = 0, int y = -1); |
1267 | void iso14755_54 (int x, int y); |
1251 | void iso14755_54 (int x, int y); |
1268 | # endif |
1252 | # endif |
1269 | #endif |
1253 | #endif |
1270 | |
1254 | |
1271 | // modifies first argument(!) |
1255 | // modifies first argument(!) |
… | |
… | |
1492 | |
1476 | |
1493 | l.l = min (l.l, ncol); |
1477 | l.l = min (l.l, ncol); |
1494 | |
1478 | |
1495 | if (ncol > prev_ncol) |
1479 | if (ncol > prev_ncol) |
1496 | scr_blank_line (l, prev_ncol, ncol - prev_ncol, DEFAULT_RSTYLE); |
1480 | scr_blank_line (l, prev_ncol, ncol - prev_ncol, DEFAULT_RSTYLE); |
|
|
1481 | } |
|
|
1482 | |
|
|
1483 | int fgcolor_of (rend_t r) |
|
|
1484 | { |
|
|
1485 | int base = GET_BASEFG (r); |
|
|
1486 | #ifndef NO_BRIGHTCOLOR |
|
|
1487 | if (r & RS_Bold |
|
|
1488 | && (!ENABLE_STYLES || options & Opt_intensityStyles) |
|
|
1489 | && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) |
|
|
1490 | base += minBrightCOLOR - minCOLOR; |
|
|
1491 | #endif |
|
|
1492 | return base; |
|
|
1493 | } |
|
|
1494 | |
|
|
1495 | int bgcolor_of (rend_t r) |
|
|
1496 | { |
|
|
1497 | int base = GET_BASEBG (r); |
|
|
1498 | #ifndef NO_BRIGHTCOLOR |
|
|
1499 | if (r & RS_Blink |
|
|
1500 | && (!ENABLE_STYLES || options & Opt_intensityStyles) |
|
|
1501 | && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) |
|
|
1502 | base += minBrightCOLOR - minCOLOR; |
|
|
1503 | #endif |
|
|
1504 | return base; |
1497 | } |
1505 | } |
1498 | |
1506 | |
1499 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs); |
1507 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs); |
1500 | void scr_blank_screen_mem (line_t &l, rend_t efs); |
1508 | void scr_blank_screen_mem (line_t &l, rend_t efs); |
1501 | int scr_scroll_text (int row1, int row2, int count); |
1509 | int scr_scroll_text (int row1, int row2, int count); |