… | |
… | |
21 | #include "iom.h" |
21 | #include "iom.h" |
22 | #include "salloc.h" |
22 | #include "salloc.h" |
23 | |
23 | |
24 | #if ENABLE_FRILLS |
24 | #if ENABLE_FRILLS |
25 | # define ENABLE_XEMBED 1 |
25 | # define ENABLE_XEMBED 1 |
|
|
26 | # define ENABLE_EWMH 1 |
|
|
27 | # define CURSOR_BLINK 1 |
26 | #endif |
28 | #endif |
27 | |
29 | |
28 | /* |
30 | /* |
29 | ***************************************************************************** |
31 | ***************************************************************************** |
30 | * SYSTEM HACKS |
32 | * SYSTEM HACKS |
… | |
… | |
135 | #endif |
137 | #endif |
136 | |
138 | |
137 | /* If we're using either the rxvt scrollbar or menu bars, keep the |
139 | /* If we're using either the rxvt scrollbar or menu bars, keep the |
138 | * scrollColor resource. |
140 | * scrollColor resource. |
139 | */ |
141 | */ |
140 | #if defined(RXVT_SCROLLBAR) || defined(MENUBAR) || defined(PLAIN_SCROLLBAR) |
142 | #if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(MENUBAR) || defined(PLAIN_SCROLLBAR) |
141 | # define KEEP_SCROLLCOLOR 1 |
143 | # define KEEP_SCROLLCOLOR 1 |
142 | #else |
144 | #else |
143 | # undef KEEP_SCROLLCOLOR |
145 | # undef KEEP_SCROLLCOLOR |
144 | #endif |
146 | #endif |
145 | |
147 | |
… | |
… | |
202 | |
204 | |
203 | // XEMBED detail code |
205 | // XEMBED detail code |
204 | # define XEMBED_FOCUS_CURRENT 0 |
206 | # define XEMBED_FOCUS_CURRENT 0 |
205 | # define XEMBED_FOCUS_FIRST 1 |
207 | # define XEMBED_FOCUS_FIRST 1 |
206 | # define XEMBED_FOCUS_LAST 2 |
208 | # define XEMBED_FOCUS_LAST 2 |
|
|
209 | |
|
|
210 | # define XEMBED_MAPPED (1 << 0) |
207 | #endif |
211 | #endif |
208 | |
212 | |
209 | /* |
213 | /* |
210 | ***************************************************************************** |
214 | ***************************************************************************** |
211 | * NORMAL DEFINES |
215 | * NORMAL DEFINES |
… | |
… | |
263 | |
267 | |
264 | #define R_SB_ALIGN_CENTRE 0 |
268 | #define R_SB_ALIGN_CENTRE 0 |
265 | #define R_SB_ALIGN_TOP 1 |
269 | #define R_SB_ALIGN_TOP 1 |
266 | #define R_SB_ALIGN_BOTTOM 2 |
270 | #define R_SB_ALIGN_BOTTOM 2 |
267 | |
271 | |
268 | #define R_SB_RXVT 0 |
|
|
269 | #define R_SB_NEXT 1 |
272 | #define R_SB_NEXT 1 |
270 | #define R_SB_XTERM 2 |
273 | #define R_SB_XTERM 2 |
271 | #define R_SB_PLAIN 4 |
274 | #define R_SB_PLAIN 4 |
|
|
275 | #define R_SB_RXVT 8 |
272 | |
276 | |
273 | #define SB_WIDTH_NEXT 19 |
277 | #define SB_WIDTH_NEXT 19 |
274 | #define SB_WIDTH_XTERM 15 |
278 | #define SB_WIDTH_XTERM 15 |
275 | #define SB_WIDTH_PLAIN 7 |
279 | #define SB_WIDTH_PLAIN 7 |
276 | #ifndef SB_WIDTH_RXVT |
280 | #ifndef SB_WIDTH_RXVT |
… | |
… | |
469 | XTerm_Color_UL = 19, // change actual 'Underline' color |
473 | XTerm_Color_UL = 19, // change actual 'Underline' color |
470 | XTerm_Pixmap = 20, // new bg pixmap |
474 | XTerm_Pixmap = 20, // new bg pixmap |
471 | XTerm_restoreFG = 39, // change default fg color |
475 | XTerm_restoreFG = 39, // change default fg color |
472 | XTerm_restoreBG = 49, // change default bg color |
476 | XTerm_restoreBG = 49, // change default bg color |
473 | XTerm_dumpscreen = 55, // dump scrollback and all of screen |
477 | XTerm_dumpscreen = 55, // dump scrollback and all of screen |
|
|
478 | |
474 | XTerm_locale = 701, // change locale |
479 | URxvt_locale = 701, // change locale |
475 | XTerm_Menu = 703, // set menu item |
480 | URxvt_Menu = 703, // set menu item |
476 | XTerm_Color_IT = 704, // change actual 'Italic' colour |
481 | URxvt_Color_IT = 704, // change actual 'Italic' colour |
477 | XTerm_Color_tint = 705, // change actual tint colour |
482 | URxvt_Color_tint = 705, // change actual tint colour |
478 | |
483 | |
479 | URxvt_font = 710, |
484 | URxvt_font = 710, |
480 | URxvt_boldFont = 711, |
485 | URxvt_boldFont = 711, |
481 | URxvt_italicFont = 712, |
486 | URxvt_italicFont = 712, |
482 | URxvt_boldItalicFont = 713, |
487 | URxvt_boldItalicFont = 713, |
|
|
488 | |
|
|
489 | URxvt_view_up = 720, |
|
|
490 | URxvt_view_down = 721, |
483 | }; |
491 | }; |
484 | |
492 | |
485 | /* Words starting with `Color_' are colours. Others are counts */ |
493 | /* Words starting with `Color_' are colours. Others are counts */ |
486 | /* |
494 | /* |
487 | * The following comment is mostly obsolete since pixcolor_set was expanded: |
495 | * The following comment is mostly obsolete since pixcolor_set was expanded: |
… | |
… | |
636 | Rs_ext_bwidth, |
644 | Rs_ext_bwidth, |
637 | Rs_int_bwidth, |
645 | Rs_int_bwidth, |
638 | Rs_borderLess, |
646 | Rs_borderLess, |
639 | Rs_lineSpace, |
647 | Rs_lineSpace, |
640 | Rs_pty_fd, |
648 | Rs_pty_fd, |
|
|
649 | Rs_cursorUnderline, |
|
|
650 | #endif |
|
|
651 | #if CURSOR_BLINK |
|
|
652 | Rs_cursorBlink, |
641 | #endif |
653 | #endif |
642 | #if ENABLE_XEMBED |
654 | #if ENABLE_XEMBED |
643 | Rs_embed, |
655 | Rs_embed, |
644 | #endif |
656 | #endif |
645 | Rs_cutchars, |
657 | Rs_cutchars, |
646 | Rs_modifier, |
658 | Rs_modifier, |
647 | Rs_answerbackstring, |
659 | Rs_answerbackstring, |
648 | Rs_tripleclickwords, |
660 | Rs_tripleclickwords, |
649 | Rs_insecure, |
661 | Rs_insecure, |
650 | Rs_cursorBlink, |
|
|
651 | Rs_pointerBlank, |
662 | Rs_pointerBlank, |
652 | Rs_pointerBlankDelay, |
663 | Rs_pointerBlankDelay, |
653 | Rs_imLocale, |
664 | Rs_imLocale, |
654 | Rs_imFont, |
665 | Rs_imFont, |
655 | Rs_pastableTabs, |
666 | Rs_pastableTabs, |
… | |
… | |
678 | XA_INCR, |
689 | XA_INCR, |
679 | XA_WM_PROTOCOLS, |
690 | XA_WM_PROTOCOLS, |
680 | XA_WM_DELETE_WINDOW, |
691 | XA_WM_DELETE_WINDOW, |
681 | XA_CLIPBOARD, |
692 | XA_CLIPBOARD, |
682 | #if ENABLE_FRILLS |
693 | #if ENABLE_FRILLS |
|
|
694 | XA_MOTIF_WM_HINTS, |
|
|
695 | #endif |
|
|
696 | #if ENABLE_EWMH |
683 | XA_NET_WM_PID, |
697 | XA_NET_WM_PID, |
684 | XA_MOTIF_WM_HINTS, |
|
|
685 | XA_NET_WM_NAME, |
698 | XA_NET_WM_NAME, |
686 | XA_NET_WM_ICON_NAME, |
699 | XA_NET_WM_ICON_NAME, |
|
|
700 | XA_NET_WM_PING, |
687 | #endif |
701 | #endif |
688 | #if USE_XIM |
702 | #if USE_XIM |
689 | XA_WM_LOCALE_NAME, |
703 | XA_WM_LOCALE_NAME, |
690 | #endif |
704 | #endif |
691 | #if TRANSPARENT |
705 | #if TRANSPARENT |
… | |
… | |
696 | XA_DNDPROTOCOL, |
710 | XA_DNDPROTOCOL, |
697 | XA_DNDSELECTION, |
711 | XA_DNDSELECTION, |
698 | #endif |
712 | #endif |
699 | #if ENABLE_XEMBED |
713 | #if ENABLE_XEMBED |
700 | XA_XEMBED, |
714 | XA_XEMBED, |
|
|
715 | XA_XEMBED_INFO, |
701 | #endif |
716 | #endif |
702 | NUM_XA |
717 | NUM_XA |
703 | }; |
718 | }; |
704 | |
719 | |
705 | /* DEC private modes */ |
720 | /* DEC private modes */ |
… | |
… | |
1212 | void scr_overlay_off (); |
1227 | void scr_overlay_off (); |
1213 | void scr_overlay_set (int x, int y, |
1228 | void scr_overlay_set (int x, int y, |
1214 | text_t text, |
1229 | text_t text, |
1215 | rend_t rend = OVERLAY_RSTYLE); |
1230 | rend_t rend = OVERLAY_RSTYLE); |
1216 | void scr_overlay_set (int x, int y, const char *s); |
1231 | void scr_overlay_set (int x, int y, const char *s); |
|
|
1232 | void scr_overlay_set (int x, int y, const wchar_t *s); |
1217 | #endif |
1233 | #endif |
1218 | |
1234 | |
1219 | vector<void *> allocated; // free these memory blocks with free() |
1235 | vector<void *> allocated; // free these memory blocks with free() |
1220 | |
1236 | |
1221 | char *env_windowid; /* environmental variable WINDOWID */ |
1237 | char *env_windowid; /* environmental variable WINDOWID */ |
… | |
… | |
1463 | void scr_release (); |
1479 | void scr_release (); |
1464 | void scr_clear (bool really = false); |
1480 | void scr_clear (bool really = false); |
1465 | void scr_refresh (unsigned char refresh_type); |
1481 | void scr_refresh (unsigned char refresh_type); |
1466 | bool scr_refresh_rend (rend_t mask, rend_t value); |
1482 | bool scr_refresh_rend (rend_t mask, rend_t value); |
1467 | void scr_erase_screen (int mode); |
1483 | void scr_erase_screen (int mode); |
|
|
1484 | #if ENABLE_FRILLS |
|
|
1485 | void scr_erase_savelines (); |
|
|
1486 | void scr_backindex (); |
|
|
1487 | void scr_forwardindex (); |
|
|
1488 | #endif |
1468 | void scr_touch (bool refresh); |
1489 | void scr_touch (bool refresh); |
1469 | void scr_expose (int x, int y, int width, int height, bool refresh); |
1490 | void scr_expose (int x, int y, int width, int height, bool refresh); |
1470 | rxvt_fontset *scr_find_fontset (rend_t r = DEFAULT_RSTYLE); |
1491 | rxvt_fontset *scr_find_fontset (rend_t r = DEFAULT_RSTYLE); |
1471 | void scr_recolour (); |
1492 | void scr_recolour (); |
1472 | void scr_remap_chars (); |
1493 | void scr_remap_chars (); |
… | |
… | |
1479 | void scr_color (unsigned int color, int fgbg); |
1500 | void scr_color (unsigned int color, int fgbg); |
1480 | void scr_rendition (int set, int style); |
1501 | void scr_rendition (int set, int style); |
1481 | void scr_add_lines (const unicode_t *str, int nlines, int len); |
1502 | void scr_add_lines (const unicode_t *str, int nlines, int len); |
1482 | void scr_backspace (); |
1503 | void scr_backspace (); |
1483 | void scr_tab (int count, bool ht = false); |
1504 | void scr_tab (int count, bool ht = false); |
1484 | void scr_backindex (); |
|
|
1485 | void scr_forwardindex (); |
|
|
1486 | void scr_gotorc (int row, int col, int relative); |
1505 | void scr_gotorc (int row, int col, int relative); |
1487 | void scr_index (enum page_dirn direction); |
1506 | void scr_index (enum page_dirn direction); |
1488 | void scr_erase_line (int mode); |
1507 | void scr_erase_line (int mode); |
1489 | void scr_E (); |
1508 | void scr_E (); |
1490 | void scr_insdel_lines (int count, int insdel); |
1509 | void scr_insdel_lines (int count, int insdel); |