… | |
… | |
209 | # define TERMENV "rxvt-unicode" |
209 | # define TERMENV "rxvt-unicode" |
210 | #endif |
210 | #endif |
211 | |
211 | |
212 | #if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) |
212 | #if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) |
213 | # define NO_MOUSE_REPORT_SCROLLBAR 1 |
213 | # define NO_MOUSE_REPORT_SCROLLBAR 1 |
214 | #endif |
|
|
215 | |
|
|
216 | #ifdef NO_RESOURCES |
|
|
217 | # undef USE_XGETDEFAULT |
|
|
218 | #endif |
214 | #endif |
219 | |
215 | |
220 | #if defined (ISO_14755) || defined (ENABLE_PERL) |
216 | #if defined (ISO_14755) || defined (ENABLE_PERL) |
221 | # define ENABLE_OVERLAY 1 |
217 | # define ENABLE_OVERLAY 1 |
222 | #endif |
218 | #endif |
… | |
… | |
699 | #define Col2Pixel(col) ((int32_t)Width2Pixel(col)) |
695 | #define Col2Pixel(col) ((int32_t)Width2Pixel(col)) |
700 | #define Row2Pixel(row) ((int32_t)Height2Pixel(row)) |
696 | #define Row2Pixel(row) ((int32_t)Height2Pixel(row)) |
701 | #define Width2Pixel(n) ((int32_t)(n) * (int32_t)fwidth) |
697 | #define Width2Pixel(n) ((int32_t)(n) * (int32_t)fwidth) |
702 | #define Height2Pixel(n) ((int32_t)(n) * (int32_t)fheight) |
698 | #define Height2Pixel(n) ((int32_t)(n) * (int32_t)fheight) |
703 | |
699 | |
|
|
700 | #define TEMP_ENV temp_environ temp_environ (envv) |
|
|
701 | |
|
|
702 | #define OPTION(opt) (options & (opt)) |
|
|
703 | #define DEFAULT_OPTIONS (Opt_scrollBar | Opt_scrollTtyOutput \ |
|
|
704 | | Opt_jumpScroll | Opt_secondaryScreen \ |
|
|
705 | | Opt_pastableTabs | Opt_intensityStyles) |
|
|
706 | |
704 | // for m >= -n, ensure remainder lies between 0..n-1 |
707 | // for m >= -n, ensure remainder lies between 0..n-1 |
705 | #define MOD(m,n) (((m) + (n)) % (n)) |
708 | #define MOD(m,n) (((m) + (n)) % (n)) |
706 | |
709 | |
707 | #define LINENO(n) MOD (term_start + int(n), total_rows) |
710 | #define LINENO(n) MOD (term_start + int(n), total_rows) |
708 | #define ROW(n) row_buf [LINENO (n)] |
711 | #define ROW(n) row_buf [LINENO (n)] |
… | |
… | |
834 | extern void rxvt_fatal (const char *fmt, ...) __attribute__ ((noreturn)); |
837 | extern void rxvt_fatal (const char *fmt, ...) __attribute__ ((noreturn)); |
835 | extern void rxvt_exit_failure () __attribute__ ((noreturn)); |
838 | extern void rxvt_exit_failure () __attribute__ ((noreturn)); |
836 | |
839 | |
837 | #define SET_LOCALE(locale) rxvt_set_locale (locale) |
840 | #define SET_LOCALE(locale) rxvt_set_locale (locale) |
838 | extern bool rxvt_set_locale (const char *locale); |
841 | extern bool rxvt_set_locale (const char *locale); |
839 | extern bool rxvt_push_locale (const char *locale); |
842 | extern void rxvt_push_locale (const char *locale); |
840 | extern void rxvt_pop_locale (); |
843 | extern void rxvt_pop_locale (); |
841 | |
844 | |
842 | /****************************************************************************/ |
845 | /****************************************************************************/ |
843 | |
846 | |
844 | #ifdef MENUBAR |
847 | #ifdef MENUBAR |
… | |
… | |
968 | #endif |
971 | #endif |
969 | |
972 | |
970 | struct rxvt_term : zero_initialized, rxvt_vars { |
973 | struct rxvt_term : zero_initialized, rxvt_vars { |
971 | log_callback *log_hook; // log error messages through this hook, if != 0 |
974 | log_callback *log_hook; // log error messages through this hook, if != 0 |
972 | getfd_callback *getfd_hook; // convert remote to local fd, if != 0 |
975 | getfd_callback *getfd_hook; // convert remote to local fd, if != 0 |
973 | |
|
|
974 | #if ENABLE_PERL |
976 | #if ENABLE_PERL |
975 | rxvt_perl_term perl; |
977 | rxvt_perl_term perl; |
976 | #endif |
978 | #endif |
977 | |
|
|
978 | struct mbstate mbstate; // current input multibyte state |
979 | struct mbstate mbstate; // current input multibyte state |
979 | |
980 | |
980 | unsigned char want_refresh:1, |
981 | unsigned char want_refresh:1, |
981 | #ifdef TRANSPARENT |
982 | #ifdef TRANSPARENT |
982 | want_full_refresh:1, /* awaiting full screen refresh */ |
983 | want_full_refresh:1, /* awaiting full screen refresh */ |
… | |
… | |
1255 | |
1256 | |
1256 | bool pty_fill (); |
1257 | bool pty_fill (); |
1257 | |
1258 | |
1258 | void init_secondary (); |
1259 | void init_secondary (); |
1259 | const char **init_resources (int argc, const char *const *argv); |
1260 | const char **init_resources (int argc, const char *const *argv); |
|
|
1261 | const char *x_resource (const char *name); |
1260 | void init_env (); |
1262 | void init_env (); |
1261 | void set_locale (const char *locale); |
1263 | void set_locale (const char *locale); |
1262 | void init_xlocale (); |
1264 | void init_xlocale (); |
1263 | void init_command (const char *const *argv); |
1265 | void init_command (const char *const *argv); |
1264 | void run_command (const char *const *argv); |
1266 | void run_command (const char *const *argv); |
… | |
… | |
1441 | base += minBrightCOLOR - minCOLOR; |
1443 | base += minBrightCOLOR - minCOLOR; |
1442 | #endif |
1444 | #endif |
1443 | return base; |
1445 | return base; |
1444 | } |
1446 | } |
1445 | |
1447 | |
|
|
1448 | bool option (uint32_t opt) |
|
|
1449 | { |
|
|
1450 | return OPTION (opt); |
|
|
1451 | } |
|
|
1452 | |
|
|
1453 | void set_option (uint32_t opt, bool set) |
|
|
1454 | { |
|
|
1455 | if (set) |
|
|
1456 | options |= opt; |
|
|
1457 | else |
|
|
1458 | options &= ~opt; |
|
|
1459 | } |
|
|
1460 | |
1446 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs); |
1461 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs); |
1447 | void scr_blank_screen_mem (line_t &l, rend_t efs); |
1462 | void scr_blank_screen_mem (line_t &l, rend_t efs); |
1448 | int scr_scroll_text (int row1, int row2, int count); |
1463 | int scr_scroll_text (int row1, int row2, int count); |
1449 | void scr_reset (); |
1464 | void scr_reset (); |
1450 | void scr_release (); |
1465 | void scr_release (); |
… | |
… | |
1493 | int scr_move_to (int y, int len); |
1508 | int scr_move_to (int y, int len); |
1494 | int scr_page (enum page_dirn direction, int nlines); |
1509 | int scr_page (enum page_dirn direction, int nlines); |
1495 | int scr_changeview (unsigned int oldviewstart); |
1510 | int scr_changeview (unsigned int oldviewstart); |
1496 | void scr_bell (); |
1511 | void scr_bell (); |
1497 | void scr_printscreen (int fullhist); |
1512 | void scr_printscreen (int fullhist); |
|
|
1513 | void scr_xor_rect (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle1, rend_t rstyle2); |
|
|
1514 | void scr_xor_span (int beg_row, int beg_col, int end_row, int end_col, rend_t rstyle); |
1498 | void scr_reverse_selection (); |
1515 | void scr_reverse_selection (); |
1499 | void scr_dump (int fd); |
1516 | void scr_dump (int fd); |
1500 | void selection_check (int check_more); |
1517 | void selection_check (int check_more); |
1501 | void selection_paste (Window win, Atom prop, bool delete_prop); |
1518 | void selection_paste (Window win, Atom prop, bool delete_prop); |
1502 | void selection_property (Window win, Atom prop); |
1519 | void selection_property (Window win, Atom prop); |