… | |
… | |
247 | # define COLORTERMENVFULL COLORTERMENV "-xpm" |
247 | # define COLORTERMENVFULL COLORTERMENV "-xpm" |
248 | #else |
248 | #else |
249 | # define COLORTERMENVFULL COLORTERMENV |
249 | # define COLORTERMENVFULL COLORTERMENV |
250 | #endif |
250 | #endif |
251 | #ifndef TERMENV |
251 | #ifndef TERMENV |
|
|
252 | # if USE_256_COLORS |
|
|
253 | # define TERMENV "rxvt-unicode-256color" |
|
|
254 | # else |
252 | # define TERMENV "rxvt-unicode" |
255 | # define TERMENV "rxvt-unicode" |
|
|
256 | # endif |
253 | #endif |
257 | #endif |
254 | |
258 | |
255 | #if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) |
259 | #if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) |
256 | # define NO_MOUSE_REPORT_SCROLLBAR 1 |
260 | # define NO_MOUSE_REPORT_SCROLLBAR 1 |
257 | #endif |
261 | #endif |
… | |
… | |
303 | /* arguments for rxvt_scr_change_screen () */ |
307 | /* arguments for rxvt_scr_change_screen () */ |
304 | enum { |
308 | enum { |
305 | PRIMARY = 0, |
309 | PRIMARY = 0, |
306 | SECONDARY, |
310 | SECONDARY, |
307 | }; |
311 | }; |
|
|
312 | |
|
|
313 | // define various rendition bits and masks. the rendition word |
|
|
314 | // is 32 bits in size, and we should use it as efficiently as possible |
308 | |
315 | |
309 | #define RS_None 0 |
316 | #define RS_None 0 |
310 | |
317 | |
311 | // GET_BGATTR depends on RS_fgShift > RS_bgShift |
318 | // GET_BGATTR depends on RS_fgShift > RS_bgShift |
312 | #define RS_colorMask ((1UL << Color_Bits) - 1UL) |
319 | #define RS_colorMask ((1UL << Color_Bits) - 1UL) |
… | |
… | |
316 | #define RS_fgMask (RS_colorMask << RS_fgShift) |
323 | #define RS_fgMask (RS_colorMask << RS_fgShift) |
317 | |
324 | |
318 | // must have space for rxvt_fontset::fontCount * 2 + 2 values |
325 | // must have space for rxvt_fontset::fontCount * 2 + 2 values |
319 | #define RS_fontShift (RS_fgShift + Color_Bits) |
326 | #define RS_fontShift (RS_fgShift + Color_Bits) |
320 | #define RS_Careful (1UL << RS_fontShift) /* be careful when drawing these */ |
327 | #define RS_Careful (1UL << RS_fontShift) /* be careful when drawing these */ |
|
|
328 | #define RS_fontCount rxvt_fontset::fontCount |
321 | #define RS_fontMask ((rxvt_fontset::fontCount << (RS_fontShift + 1)) | RS_Careful) // includes RS_Careful |
329 | #define RS_fontMask ((RS_fontCount << (RS_fontShift + 1)) | RS_Careful) // includes RS_Careful |
322 | |
330 | |
323 | // toggle this to force redraw, must be != RS_Careful and otherwise "pretty neutral" |
331 | // toggle this to force redraw, must be != RS_Careful and otherwise "pretty neutral" |
324 | #define RS_redraw (2UL << RS_fontShift) |
332 | #define RS_redraw (2UL << RS_fontShift) |
325 | |
333 | |
|
|
334 | #define RS_Sel (1UL << 22) |
|
|
335 | |
326 | // 5 custom bits for extensions |
336 | // 4 custom bits for extensions |
327 | #define RS_customCount 16UL |
337 | #define RS_customCount 16UL |
328 | #define RS_customShift 23 |
338 | #define RS_customShift 23 |
329 | #define RS_customMask ((RS_customCount - 1UL) << RS_customShift) |
339 | #define RS_customMask ((RS_customCount - 1UL) << RS_customShift) |
330 | |
340 | |
331 | // font styles |
341 | // font styles |
… | |
… | |
382 | XTerm_Color_cursor = 12, // change actual 'Cursor' color |
392 | XTerm_Color_cursor = 12, // change actual 'Cursor' color |
383 | XTerm_Color_pointer_fg = 13, // change actual 'Pointer' fg color |
393 | XTerm_Color_pointer_fg = 13, // change actual 'Pointer' fg color |
384 | XTerm_Color_pointer_bg = 14, // change actual 'Pointer' bg color |
394 | XTerm_Color_pointer_bg = 14, // change actual 'Pointer' bg color |
385 | XTerm_Color05 = 15, // not implemented (tektronix fg) |
395 | XTerm_Color05 = 15, // not implemented (tektronix fg) |
386 | XTerm_Color06 = 16, // not implemented (tektronix bg) |
396 | XTerm_Color06 = 16, // not implemented (tektronix bg) |
387 | XTerm_Color_RV = 17, // change actual 'Highlight' color |
397 | XTerm_Color_HC = 17, // change actual 'Highlight' bg color |
|
|
398 | XTerm_Color_HTC = 19, // change actual 'Highlight' fg color |
388 | XTerm_logfile = 46, // not implemented |
399 | XTerm_logfile = 46, // not implemented |
389 | XTerm_font = 50, |
400 | XTerm_font = 50, |
390 | |
401 | |
391 | XTerm_konsole30 = 30, // reserved for konsole |
402 | XTerm_konsole30 = 30, // reserved for konsole |
392 | XTerm_konsole31 = 31, // reserved for konsole |
403 | XTerm_konsole31 = 31, // reserved for konsole |
… | |
… | |
394 | /* |
405 | /* |
395 | * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL) |
406 | * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL) |
396 | */ |
407 | */ |
397 | |
408 | |
398 | // deprecated |
409 | // deprecated |
399 | Rxvt_Color_BD = 18, |
|
|
400 | Rxvt_Color_UL = 19, |
|
|
401 | Rxvt_restoreFG = 39, |
410 | Rxvt_restoreFG = 39, |
402 | Rxvt_restoreBG = 49, |
411 | Rxvt_restoreBG = 49, |
403 | |
412 | |
404 | Rxvt_Pixmap = 20, // new bg pixmap |
413 | Rxvt_Pixmap = 20, // new bg pixmap |
405 | Rxvt_dumpscreen = 55, // dump scrollback and all of screen |
414 | Rxvt_dumpscreen = 55, // dump scrollback and all of screen |
… | |
… | |
459 | Color_White = maxBrightCOLOR, |
468 | Color_White = maxBrightCOLOR, |
460 | #else |
469 | #else |
461 | Color_White = maxCOLOR, |
470 | Color_White = maxCOLOR, |
462 | #endif |
471 | #endif |
463 | minTermCOLOR = Color_White + 1, |
472 | minTermCOLOR = Color_White + 1, |
464 | #ifndef USE_256_COLORS |
473 | #if USE_256_COLORS |
|
|
474 | maxTermCOLOR = Color_White + 240, |
|
|
475 | #else |
465 | maxTermCOLOR = Color_White + 72, |
476 | maxTermCOLOR = Color_White + 72, |
466 | #else |
|
|
467 | maxTermCOLOR = Color_White + 240, |
|
|
468 | #endif |
477 | #endif |
469 | #ifndef NO_CURSORCOLOR |
478 | #ifndef NO_CURSORCOLOR |
470 | Color_cursor, |
479 | Color_cursor, |
471 | Color_cursor2, |
480 | Color_cursor2, |
472 | #endif |
481 | #endif |
… | |
… | |
482 | #if ENABLE_FRILLS |
491 | #if ENABLE_FRILLS |
483 | Color_underline, |
492 | Color_underline, |
484 | #endif |
493 | #endif |
485 | #ifdef OPTION_HC |
494 | #ifdef OPTION_HC |
486 | Color_HC, |
495 | Color_HC, |
|
|
496 | Color_HTC, |
487 | #endif |
497 | #endif |
488 | Color_scroll, |
498 | Color_scroll, |
489 | #ifdef RXVT_SCROLLBAR |
499 | #ifdef RXVT_SCROLLBAR |
490 | Color_trough, |
500 | Color_trough, |
491 | #endif |
501 | #endif |
… | |
… | |
503 | #else |
513 | #else |
504 | TOTAL_COLORS = NRS_COLORS |
514 | TOTAL_COLORS = NRS_COLORS |
505 | #endif |
515 | #endif |
506 | }; |
516 | }; |
507 | |
517 | |
508 | #ifndef USE_256_COLORS |
518 | #if USE_256_COLORS |
509 | #define Color_Bits 7 // 0 .. maxTermCOLOR |
519 | # define Color_Bits 9 // 0 .. maxTermCOLOR |
510 | #else |
520 | #else |
511 | #define Color_Bits 9 // 0 .. maxTermCOLOR |
521 | # define Color_Bits 7 // 0 .. maxTermCOLOR |
512 | #endif |
522 | #endif |
513 | |
523 | |
514 | /* |
524 | /* |
515 | * Resource list |
525 | * Resource list |
516 | */ |
526 | */ |
… | |
… | |
605 | /* |
615 | /* |
606 | ***************************************************************************** |
616 | ***************************************************************************** |
607 | * MACRO DEFINES |
617 | * MACRO DEFINES |
608 | ***************************************************************************** |
618 | ***************************************************************************** |
609 | */ |
619 | */ |
|
|
620 | |
|
|
621 | // speed hack, copy some member variable into a local variable of the same name |
610 | #define dLocal(type,name) type const name = this->name |
622 | #define dLocal(type,name) type const name = this->name |
611 | |
623 | |
612 | // for speed reasons, we assume that all codepoints 32 to 126 are |
624 | // for speed reasons, we assume that all codepoints 32 to 126 are |
613 | // single-width. |
625 | // single-width. |
614 | #define WCWIDTH(c) (IN_RANGE_INC (c, 0x20, 0x7e) ? 1 : wcwidth (c)) |
626 | #define WCWIDTH(c) (IN_RANGE_INC (c, 0x20, 0x7e) ? 1 : wcwidth (c)) |
… | |
… | |
954 | scrollBar_t scrollBar; |
966 | scrollBar_t scrollBar; |
955 | uint8_t options[(Opt_count + 7) >> 3]; |
967 | uint8_t options[(Opt_count + 7) >> 3]; |
956 | XSizeHints szHint; |
968 | XSizeHints szHint; |
957 | rxvt_color *pix_colors; |
969 | rxvt_color *pix_colors; |
958 | Cursor TermWin_cursor; /* cursor for vt window */ |
970 | Cursor TermWin_cursor; /* cursor for vt window */ |
959 | int numlock_state; |
|
|
960 | line_t *row_buf; // all lines, scrollback + terminal, circular, followed by temp_buf |
971 | line_t *row_buf; // all lines, scrollback + terminal, circular, followed by temp_buf |
961 | line_t *drawn_buf; // text on screen |
972 | line_t *drawn_buf; // text on screen |
962 | line_t *swap_buf; // lines for swap buffer |
973 | line_t *swap_buf; // lines for swap buffer |
963 | char *tabs; /* per location: 1 == tab-stop */ |
974 | char *tabs; /* per location: 1 == tab-stop */ |
964 | screen_t screen; |
975 | screen_t screen; |
… | |
… | |
1297 | void recolour_cursor (); |
1308 | void recolour_cursor (); |
1298 | void resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent); |
1309 | void resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent); |
1299 | void window_calc (unsigned int newwidth, unsigned int newheight); |
1310 | void window_calc (unsigned int newwidth, unsigned int newheight); |
1300 | bool set_fonts (); |
1311 | bool set_fonts (); |
1301 | void set_string_property (Atom prop, const char *str, int len = -1); |
1312 | void set_string_property (Atom prop, const char *str, int len = -1); |
|
|
1313 | void set_mbstring_property (Atom prop, const char *str, int len = -1); |
1302 | void set_utf8_property (Atom prop, const char *str, int len = -1); |
1314 | void set_utf8_property (Atom prop, const char *str, int len = -1); |
1303 | void set_title (const char *str); |
1315 | void set_title (const char *str); |
1304 | void set_icon_name (const char *str); |
1316 | void set_icon_name (const char *str); |
1305 | void set_window_color (int idx, const char *color); |
1317 | void set_window_color (int idx, const char *color); |
1306 | void set_colorfgbg (); |
1318 | void set_colorfgbg (); |