… | |
… | |
573 | Rs_font, |
573 | Rs_font, |
574 | #if ENABLE_STYLES |
574 | #if ENABLE_STYLES |
575 | Rs_boldFont, |
575 | Rs_boldFont, |
576 | Rs_italicFont, |
576 | Rs_italicFont, |
577 | Rs_boldItalicFont, |
577 | Rs_boldItalicFont, |
|
|
578 | Rs_intensityStyles, |
578 | #endif |
579 | #endif |
579 | Rs_name, |
580 | Rs_name, |
580 | Rs_title, |
581 | Rs_title, |
581 | #if defined (XPM_BACKGROUND) || (MENUBAR_MAX) |
582 | #if defined (XPM_BACKGROUND) || (MENUBAR_MAX) |
582 | Rs_path, |
583 | Rs_path, |
… | |
… | |
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) |
… | |
… | |
959 | #endif |
943 | #endif |
960 | |
944 | |
961 | extern class rxvt_failure_exception { } rxvt_failure_exception; |
945 | extern class rxvt_failure_exception { } rxvt_failure_exception; |
962 | |
946 | |
963 | typedef callback1<void, const char *> log_callback; |
947 | typedef callback1<void, const char *> log_callback; |
|
|
948 | typedef callback1<int, int> getfd_callback; |
964 | |
949 | |
965 | extern void rxvt_vlog (const char *fmt, va_list arg_ptr); |
950 | extern void rxvt_vlog (const char *fmt, va_list arg_ptr); |
966 | extern void rxvt_log (const char *fmt, ...); |
951 | extern void rxvt_log (const char *fmt, ...); |
967 | extern void rxvt_warn (const char *fmt, ...); |
952 | extern void rxvt_warn (const char *fmt, ...); |
968 | extern void rxvt_fatal (const char *fmt, ...) __attribute__ ((noreturn)); |
953 | extern void rxvt_fatal (const char *fmt, ...) __attribute__ ((noreturn)); |
… | |
… | |
1045 | class keyboard_manager; |
1030 | class keyboard_manager; |
1046 | #endif |
1031 | #endif |
1047 | |
1032 | |
1048 | struct rxvt_term : zero_initialized, rxvt_vars { |
1033 | struct rxvt_term : zero_initialized, rxvt_vars { |
1049 | log_callback *log_hook; // log error messages through this hook, if != 0 |
1034 | log_callback *log_hook; // log error messages through this hook, if != 0 |
|
|
1035 | getfd_callback *getfd_hook; // convert remote to local fd, if != 0 |
1050 | |
1036 | |
1051 | struct mbstate mbstate; // current input multibyte state |
1037 | struct mbstate mbstate; // current input multibyte state |
1052 | |
1038 | |
1053 | unsigned char want_refresh:1, |
1039 | unsigned char want_refresh:1, |
1054 | #ifdef TRANSPARENT |
1040 | #ifdef TRANSPARENT |
… | |
… | |
1259 | // ISO 14755 entry support |
1245 | // ISO 14755 entry support |
1260 | unicode_t iso14755buf; |
1246 | unicode_t iso14755buf; |
1261 | void commit_iso14755 (); |
1247 | void commit_iso14755 (); |
1262 | int hex_keyval (XKeyEvent &ev); |
1248 | int hex_keyval (XKeyEvent &ev); |
1263 | # if ISO_14755 |
1249 | # if ISO_14755 |
1264 | 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); |
1265 | void iso14755_54 (int x, int y); |
1251 | void iso14755_54 (int x, int y); |
1266 | # endif |
1252 | # endif |
1267 | #endif |
1253 | #endif |
1268 | |
1254 | |
1269 | // modifies first argument(!) |
1255 | // modifies first argument(!) |
… | |
… | |
1470 | { |
1456 | { |
1471 | l.t = (text_t *)talloc->alloc (); |
1457 | l.t = (text_t *)talloc->alloc (); |
1472 | l.r = (rend_t *)ralloc->alloc (); |
1458 | l.r = (rend_t *)ralloc->alloc (); |
1473 | } |
1459 | } |
1474 | |
1460 | |
|
|
1461 | #if 0 |
1475 | void lfree (line_t &l) |
1462 | void lfree (line_t &l) |
1476 | { |
1463 | { |
1477 | talloc->free (l.t); |
1464 | talloc->free (l.t); |
1478 | ralloc->free (l.r); |
1465 | ralloc->free (l.r); |
1479 | } |
1466 | } |
|
|
1467 | #endif |
1480 | |
1468 | |
1481 | void lresize (line_t &l) |
1469 | void lresize (line_t &l) |
1482 | { |
1470 | { |
1483 | if (!l.t) |
1471 | if (!l.t) |
1484 | return; |
1472 | return; |
… | |
… | |
1488 | |
1476 | |
1489 | l.l = min (l.l, ncol); |
1477 | l.l = min (l.l, ncol); |
1490 | |
1478 | |
1491 | if (ncol > prev_ncol) |
1479 | if (ncol > prev_ncol) |
1492 | 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 | # if ENABLE_STYLES |
|
|
1489 | && OPTION (Opt_intensityStyles) |
|
|
1490 | # endif |
|
|
1491 | && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) |
|
|
1492 | base += minBrightCOLOR - minCOLOR; |
|
|
1493 | #endif |
|
|
1494 | return base; |
|
|
1495 | } |
|
|
1496 | |
|
|
1497 | int bgcolor_of (rend_t r) |
|
|
1498 | { |
|
|
1499 | int base = GET_BASEBG (r); |
|
|
1500 | #ifndef NO_BRIGHTCOLOR |
|
|
1501 | if (r & RS_Blink |
|
|
1502 | # if ENABLE_STYLES |
|
|
1503 | && OPTION (Opt_intensityStyles) |
|
|
1504 | # endif |
|
|
1505 | && IN_RANGE_INC (base, minCOLOR, minBrightCOLOR)) |
|
|
1506 | base += minBrightCOLOR - minCOLOR; |
|
|
1507 | #endif |
|
|
1508 | return base; |
1493 | } |
1509 | } |
1494 | |
1510 | |
1495 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs); |
1511 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs); |
1496 | void scr_blank_screen_mem (line_t &l, rend_t efs); |
1512 | void scr_blank_screen_mem (line_t &l, rend_t efs); |
1497 | int scr_scroll_text (int row1, int row2, int count); |
1513 | int scr_scroll_text (int row1, int row2, int count); |