… | |
… | |
629 | #ifdef TRANSPARENT |
629 | #ifdef TRANSPARENT |
630 | Rs_transparent, |
630 | Rs_transparent, |
631 | Rs_transparent_all, |
631 | Rs_transparent_all, |
632 | #endif |
632 | #endif |
633 | #if ENABLE_FRILLS |
633 | #if ENABLE_FRILLS |
|
|
634 | Rs_pty_fd, |
|
|
635 | Rs_hold, |
634 | Rs_ext_bwidth, |
636 | Rs_ext_bwidth, |
635 | Rs_int_bwidth, |
637 | Rs_int_bwidth, |
636 | Rs_borderLess, |
638 | Rs_borderLess, |
637 | Rs_lineSpace, |
639 | Rs_lineSpace, |
638 | Rs_pty_fd, |
|
|
639 | Rs_cursorUnderline, |
640 | Rs_cursorUnderline, |
|
|
641 | Rs_intensityStyles, |
640 | #endif |
642 | #endif |
641 | #if CURSOR_BLINK |
643 | #if CURSOR_BLINK |
642 | Rs_cursorBlink, |
644 | Rs_cursorBlink, |
643 | #endif |
645 | #endif |
644 | #if ENABLE_XEMBED |
646 | #if ENABLE_XEMBED |
… | |
… | |
826 | |
828 | |
827 | /* how to build & extract colors and attributes */ |
829 | /* how to build & extract colors and attributes */ |
828 | #define GET_BASEFG(x) (((x) & RS_fgMask)) |
830 | #define GET_BASEFG(x) (((x) & RS_fgMask)) |
829 | #define GET_BASEBG(x) (((x) & RS_bgMask)>>Color_Bits) |
831 | #define GET_BASEBG(x) (((x) & RS_bgMask)>>Color_Bits) |
830 | #ifndef NO_BRIGHTCOLOR |
832 | #ifndef NO_BRIGHTCOLOR |
831 | # define GET_FGCOLOR(x) \ |
833 | # define GET_FGCOLOR(x) ( \ |
832 | ((((x) & RS_Bold) == 0 \ |
834 | !((x) & RS_Bold) \ |
833 | || GET_BASEFG (x) < minCOLOR \ |
835 | || (ENABLE_STYLES && !(options & Opt_intensityStyles)) \ |
834 | || GET_BASEFG (x) >= minBrightCOLOR) \ |
836 | || !IN_RANGE_INC (GET_BASEFG (x), minCOLOR, minBrightCOLOR) \ |
835 | ? GET_BASEFG (x) \ |
837 | ? GET_BASEFG (x) \ |
836 | : (GET_BASEFG (x) + (minBrightCOLOR - minCOLOR))) |
838 | : (GET_BASEFG (x) + (minBrightCOLOR - minCOLOR))) |
837 | # define GET_BGCOLOR(x) \ |
839 | # define GET_BGCOLOR(x) ( \ |
838 | ((((x) & RS_Blink) == 0 \ |
840 | !((x) & RS_Blink) \ |
839 | || GET_BASEBG (x) < minCOLOR \ |
841 | || (ENABLE_STYLES && !(options & Opt_intensityStyles)) \ |
840 | || GET_BASEBG (x) >= minBrightCOLOR) \ |
842 | || !IN_RANGE_INC (GET_BASEBG (x), minCOLOR, minBrightCOLOR) \ |
841 | ? GET_BASEBG (x) \ |
843 | ? GET_BASEBG (x) \ |
842 | : (GET_BASEBG (x) + (minBrightCOLOR - minCOLOR))) |
844 | : (GET_BASEBG (x) + (minBrightCOLOR - minCOLOR))) |
843 | #else |
845 | #else |
844 | # define GET_FGCOLOR(x) GET_BASEFG(x) |
846 | # define GET_FGCOLOR(x) GET_BASEFG(x) |
845 | # define GET_BGCOLOR(x) GET_BASEBG(x) |
847 | # define GET_BGCOLOR(x) GET_BASEBG(x) |
846 | #endif |
848 | #endif |
847 | |
849 | |
… | |
… | |
958 | #endif |
960 | #endif |
959 | |
961 | |
960 | extern class rxvt_failure_exception { } rxvt_failure_exception; |
962 | extern class rxvt_failure_exception { } rxvt_failure_exception; |
961 | |
963 | |
962 | typedef callback1<void, const char *> log_callback; |
964 | typedef callback1<void, const char *> log_callback; |
|
|
965 | typedef callback1<int, int> getfd_callback; |
963 | |
966 | |
964 | extern void rxvt_vlog (const char *fmt, va_list arg_ptr); |
967 | extern void rxvt_vlog (const char *fmt, va_list arg_ptr); |
965 | extern void rxvt_log (const char *fmt, ...); |
968 | extern void rxvt_log (const char *fmt, ...); |
966 | extern void rxvt_warn (const char *fmt, ...); |
969 | extern void rxvt_warn (const char *fmt, ...); |
967 | extern void rxvt_fatal (const char *fmt, ...) __attribute__ ((noreturn)); |
970 | extern void rxvt_fatal (const char *fmt, ...) __attribute__ ((noreturn)); |
… | |
… | |
1044 | class keyboard_manager; |
1047 | class keyboard_manager; |
1045 | #endif |
1048 | #endif |
1046 | |
1049 | |
1047 | struct rxvt_term : zero_initialized, rxvt_vars { |
1050 | struct rxvt_term : zero_initialized, rxvt_vars { |
1048 | log_callback *log_hook; // log error messages through this hook, if != 0 |
1051 | log_callback *log_hook; // log error messages through this hook, if != 0 |
|
|
1052 | getfd_callback *getfd_hook; // convert remote to local fd, if != 0 |
1049 | |
1053 | |
1050 | struct mbstate mbstate; // current input multibyte state |
1054 | struct mbstate mbstate; // current input multibyte state |
1051 | |
1055 | |
1052 | unsigned char want_refresh:1, |
1056 | unsigned char want_refresh:1, |
1053 | #ifdef TRANSPARENT |
1057 | #ifdef TRANSPARENT |
… | |
… | |
1322 | |
1326 | |
1323 | void tt_winch (); |
1327 | void tt_winch (); |
1324 | |
1328 | |
1325 | rxvt_term (); |
1329 | rxvt_term (); |
1326 | ~rxvt_term (); |
1330 | ~rxvt_term (); |
|
|
1331 | void child_exit (); // child has exited, usually destroys |
1327 | void destroy (); |
1332 | void destroy (); |
1328 | void emergency_cleanup (); |
1333 | void emergency_cleanup (); |
1329 | |
1334 | |
1330 | bool init (int argc, const char *const *argv); |
1335 | bool init (int argc, const char *const *argv); |
1331 | bool init_vars (); |
1336 | bool init_vars (); |
… | |
… | |
1468 | { |
1473 | { |
1469 | l.t = (text_t *)talloc->alloc (); |
1474 | l.t = (text_t *)talloc->alloc (); |
1470 | l.r = (rend_t *)ralloc->alloc (); |
1475 | l.r = (rend_t *)ralloc->alloc (); |
1471 | } |
1476 | } |
1472 | |
1477 | |
|
|
1478 | #if 0 |
1473 | void lfree (line_t &l) |
1479 | void lfree (line_t &l) |
1474 | { |
1480 | { |
1475 | talloc->free (l.t); |
1481 | talloc->free (l.t); |
1476 | ralloc->free (l.r); |
1482 | ralloc->free (l.r); |
1477 | } |
1483 | } |
|
|
1484 | #endif |
1478 | |
1485 | |
1479 | void lresize (line_t &l) |
1486 | void lresize (line_t &l) |
1480 | { |
1487 | { |
1481 | if (!l.t) |
1488 | if (!l.t) |
1482 | return; |
1489 | return; |