… | |
… | |
353 | # if USE_256_COLORS |
353 | # if USE_256_COLORS |
354 | # define TERMENV "rxvt-unicode-256color" |
354 | # define TERMENV "rxvt-unicode-256color" |
355 | # else |
355 | # else |
356 | # define TERMENV "rxvt-unicode" |
356 | # define TERMENV "rxvt-unicode" |
357 | # endif |
357 | # endif |
|
|
358 | #endif |
|
|
359 | |
|
|
360 | // Hidden color cube for indexed 24-bit colors. There are less Green levels |
|
|
361 | // because normal human eye is less sensitive to the blue component than to |
|
|
362 | // the red or green. (https://en.m.wikipedia.org/wiki/Color_depth#8-bit_color) |
|
|
363 | #if USE_256_COLORS |
|
|
364 | // 7x7x5=245 < 254 unused color indices |
|
|
365 | # define Red_levels 7 |
|
|
366 | # define Green_levels 7 |
|
|
367 | # define Blue_levels 5 |
|
|
368 | #else |
|
|
369 | // 6x6x4=144 < 166 unused color indices |
|
|
370 | # define Red_levels 6 |
|
|
371 | # define Green_levels 6 |
|
|
372 | # define Blue_levels 4 |
358 | #endif |
373 | #endif |
359 | |
374 | |
360 | #if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) |
375 | #if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) |
361 | # define NO_MOUSE_REPORT_SCROLLBAR 1 |
376 | # define NO_MOUSE_REPORT_SCROLLBAR 1 |
362 | #endif |
377 | #endif |
… | |
… | |
558 | #if USE_256_COLORS |
573 | #if USE_256_COLORS |
559 | maxTermCOLOR = Color_White + 240, |
574 | maxTermCOLOR = Color_White + 240, |
560 | #else |
575 | #else |
561 | maxTermCOLOR = Color_White + 72, |
576 | maxTermCOLOR = Color_White + 72, |
562 | #endif |
577 | #endif |
|
|
578 | minTermCOLOR24, |
|
|
579 | maxTermCOLOR24 = minTermCOLOR24 + |
|
|
580 | (Red_levels * Green_levels * Blue_levels) - 1, |
563 | #ifndef NO_CURSORCOLOR |
581 | #ifndef NO_CURSORCOLOR |
564 | Color_cursor, |
582 | Color_cursor, |
565 | Color_cursor2, |
583 | Color_cursor2, |
566 | #endif |
584 | #endif |
567 | Color_pointer_fg, |
585 | Color_pointer_fg, |
… | |
… | |
599 | TOTAL_COLORS = NRS_COLORS |
617 | TOTAL_COLORS = NRS_COLORS |
600 | #endif |
618 | #endif |
601 | }; |
619 | }; |
602 | |
620 | |
603 | #if USE_256_COLORS |
621 | #if USE_256_COLORS |
604 | # define Color_Bits 9 // 0 .. maxTermCOLOR |
622 | # define Color_Bits 9 // 0 .. maxTermCOLOR24 |
605 | #else |
623 | #else |
606 | # define Color_Bits 7 // 0 .. maxTermCOLOR |
624 | # define Color_Bits 8 // 0 .. maxTermCOLOR24 |
|
|
625 | #endif |
|
|
626 | |
|
|
627 | #if maxTermCOLOR24 >= (1 << Color_Bits) |
|
|
628 | # error color index overflow |
607 | #endif |
629 | #endif |
608 | |
630 | |
609 | /* |
631 | /* |
610 | * Resource list |
632 | * Resource list |
611 | */ |
633 | */ |
… | |
… | |
1387 | char *get_to_st (unicode_t &ends_how); |
1409 | char *get_to_st (unicode_t &ends_how); |
1388 | void process_dcs_seq (); |
1410 | void process_dcs_seq (); |
1389 | void process_osc_seq (); |
1411 | void process_osc_seq (); |
1390 | void process_color_seq (int report, int color, const char *str, char resp); |
1412 | void process_color_seq (int report, int color, const char *str, char resp); |
1391 | void process_xterm_seq (int op, char *str, char resp); |
1413 | void process_xterm_seq (int op, char *str, char resp); |
|
|
1414 | unsigned int map_rgb24_color (unsigned int r, unsigned int g, unsigned int b); |
1392 | int privcases (int mode, unsigned long bit); |
1415 | int privcases (int mode, unsigned long bit); |
1393 | void process_terminal_mode (int mode, int priv, unsigned int nargs, const int *arg); |
1416 | void process_terminal_mode (int mode, int priv, unsigned int nargs, const int *arg); |
1394 | void process_sgr_mode (unsigned int nargs, const int *arg); |
1417 | void process_sgr_mode (unsigned int nargs, const int *arg); |
1395 | void set_cursor_style (int style); |
1418 | void set_cursor_style (int style); |
1396 | // init.C |
1419 | // init.C |