… | |
… | |
97 | /* |
97 | /* |
98 | ***************************************************************************** |
98 | ***************************************************************************** |
99 | * SYSTEM HACKS |
99 | * SYSTEM HACKS |
100 | ***************************************************************************** |
100 | ***************************************************************************** |
101 | */ |
101 | */ |
102 | /* Consistent defines - please report on the necessity |
|
|
103 | * @ Unixware: defines (__svr4__) |
|
|
104 | */ |
|
|
105 | #if defined (SVR4) && !defined (__svr4__) |
|
|
106 | # define __svr4__ 1 |
|
|
107 | #endif |
|
|
108 | #if defined (sun) && !defined (__sun__) |
|
|
109 | # define __sun__ 1 |
|
|
110 | #endif |
|
|
111 | |
102 | |
112 | #ifndef HAVE_XPOINTER |
103 | #ifndef HAVE_XPOINTER |
113 | typedef char *XPointer; |
104 | typedef char *XPointer; |
114 | #endif |
105 | #endif |
115 | |
106 | |
… | |
… | |
267 | #if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) |
258 | #if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) |
268 | # define NO_MOUSE_REPORT_SCROLLBAR 1 |
259 | # define NO_MOUSE_REPORT_SCROLLBAR 1 |
269 | #endif |
260 | #endif |
270 | |
261 | |
271 | #define scrollBar_esc 30 |
262 | #define scrollBar_esc 30 |
272 | |
|
|
273 | #if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(XTERM_SCROLLBAR) || defined(PLAIN_SCROLLBAR) |
|
|
274 | # define HAVE_SCROLLBARS 1 |
|
|
275 | #endif |
|
|
276 | |
263 | |
277 | #if !defined (RXVT_SCROLLBAR) && !defined (NEXT_SCROLLBAR) |
264 | #if !defined (RXVT_SCROLLBAR) && !defined (NEXT_SCROLLBAR) |
278 | # define NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING 1 |
265 | # define NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING 1 |
279 | #endif |
266 | #endif |
280 | |
267 | |
… | |
… | |
492 | Color_underline, |
479 | Color_underline, |
493 | #endif |
480 | #endif |
494 | #ifdef OPTION_HC |
481 | #ifdef OPTION_HC |
495 | Color_HC, |
482 | Color_HC, |
496 | #endif |
483 | #endif |
497 | #ifdef HAVE_SCROLLBARS |
|
|
498 | Color_scroll, |
484 | Color_scroll, |
499 | #endif |
|
|
500 | #ifdef RXVT_SCROLLBAR |
485 | #ifdef RXVT_SCROLLBAR |
501 | Color_trough, |
486 | Color_trough, |
502 | #endif |
487 | #endif |
503 | #if ENABLE_TRANSPARENCY |
488 | #if ENABLE_TRANSPARENCY |
504 | Color_tint, |
489 | Color_tint, |
… | |
… | |
1005 | mouse_slip_wheel_speed, |
990 | mouse_slip_wheel_speed, |
1006 | #endif |
991 | #endif |
1007 | refresh_count, |
992 | refresh_count, |
1008 | window_vt_x, |
993 | window_vt_x, |
1009 | window_vt_y, |
994 | window_vt_y, |
1010 | window_sb_x, |
|
|
1011 | mouse_row, |
995 | mouse_row, |
1012 | mouse_col, |
996 | mouse_col, |
1013 | # ifdef POINTER_BLANK |
997 | # ifdef POINTER_BLANK |
1014 | pointerBlankDelay, |
998 | pointerBlankDelay, |
1015 | # endif |
999 | # endif |
… | |
… | |
1023 | unsigned long priv_modes, |
1007 | unsigned long priv_modes, |
1024 | SavedModes; |
1008 | SavedModes; |
1025 | /* ---------- */ |
1009 | /* ---------- */ |
1026 | Atom *xa; |
1010 | Atom *xa; |
1027 | /* ---------- */ |
1011 | /* ---------- */ |
1028 | #ifdef RXVT_SCROLLBAR |
|
|
1029 | GC scrollbarGC, |
|
|
1030 | topShadowGC, |
|
|
1031 | botShadowGC; |
|
|
1032 | #endif |
|
|
1033 | #ifdef XTERM_SCROLLBAR |
|
|
1034 | GC xscrollbarGC, |
|
|
1035 | ShadowGC; |
|
|
1036 | #endif |
|
|
1037 | #ifdef PLAIN_SCROLLBAR |
|
|
1038 | GC pscrollbarGC; |
|
|
1039 | #endif |
|
|
1040 | #ifdef NEXT_SCROLLBAR |
|
|
1041 | GC blackGC, |
|
|
1042 | whiteGC, |
|
|
1043 | grayGC, |
|
|
1044 | darkGC, |
|
|
1045 | stippleGC; |
|
|
1046 | Pixmap dimple, |
|
|
1047 | upArrow, |
|
|
1048 | downArrow, |
|
|
1049 | upArrowHi, |
|
|
1050 | downArrowHi; |
|
|
1051 | #endif |
|
|
1052 | /* ---------- */ |
|
|
1053 | Time selection_time, |
1012 | Time selection_time, |
1054 | selection_request_time; |
1013 | selection_request_time; |
1055 | pid_t cmd_pid; /* process id of child */ |
1014 | pid_t cmd_pid; /* process id of child */ |
1056 | char * incr_buf; |
1015 | char * incr_buf; |
1057 | size_t incr_buf_size, incr_buf_fill; |
1016 | size_t incr_buf_size, incr_buf_fill; |
… | |
… | |
1117 | |
1076 | |
1118 | #if ENABLE_FRILLS || ISO_14755 |
1077 | #if ENABLE_FRILLS || ISO_14755 |
1119 | // ISO 14755 entry support |
1078 | // ISO 14755 entry support |
1120 | unicode_t iso14755buf; |
1079 | unicode_t iso14755buf; |
1121 | void commit_iso14755 (); |
1080 | void commit_iso14755 (); |
1122 | int hex_keyval (XKeyEvent &ev); |
|
|
1123 | # if ISO_14755 |
1081 | # if ISO_14755 |
1124 | void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE, int x = 0, int y = -1); |
1082 | void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE, int x = 0, int y = -1); |
1125 | void iso14755_54 (int x, int y); |
1083 | void iso14755_54 (int x, int y); |
1126 | # endif |
1084 | # endif |
1127 | #endif |
1085 | #endif |
… | |
… | |
1148 | #endif |
1106 | #endif |
1149 | |
1107 | |
1150 | void x_cb (XEvent &xev); |
1108 | void x_cb (XEvent &xev); |
1151 | xevent_watcher termwin_ev; |
1109 | xevent_watcher termwin_ev; |
1152 | xevent_watcher vt_ev; |
1110 | xevent_watcher vt_ev; |
1153 | #ifdef HAVE_SCROLLBARS |
|
|
1154 | xevent_watcher scrollbar_ev; |
1111 | xevent_watcher scrollbar_ev; |
1155 | #endif |
|
|
1156 | |
1112 | |
1157 | void child_cb (ev::child &w, int revents); ev::child child_ev; |
1113 | void child_cb (ev::child &w, int revents); ev::child child_ev; |
1158 | void destroy_cb (ev::idle &w, int revents); ev::idle destroy_ev; |
1114 | void destroy_cb (ev::idle &w, int revents); ev::idle destroy_ev; |
1159 | void refresh_check (); |
1115 | void refresh_check (); |
1160 | void flush (); |
1116 | void flush (); |
… | |
… | |
1374 | options[opt >> 3] |= (1 << (opt & 7)); |
1330 | options[opt >> 3] |= (1 << (opt & 7)); |
1375 | else |
1331 | else |
1376 | options[opt >> 3] &= ~(1 << (opt & 7)); |
1332 | options[opt >> 3] &= ~(1 << (opt & 7)); |
1377 | } |
1333 | } |
1378 | |
1334 | |
1379 | void PrivMode (int set, unsigned bit) NOTHROW |
1335 | void set_privmode (unsigned bit, int set) NOTHROW |
1380 | { |
1336 | { |
1381 | if (set) |
1337 | if (set) |
1382 | priv_modes |= bit; |
1338 | priv_modes |= bit; |
1383 | else |
1339 | else |
1384 | priv_modes &= ~bit; |
1340 | priv_modes &= ~bit; |
… | |
… | |
1460 | void selection_send (const XSelectionRequestEvent &rq) NOTHROW; |
1416 | void selection_send (const XSelectionRequestEvent &rq) NOTHROW; |
1461 | void selection_click (int clicks, int x, int y) NOTHROW; |
1417 | void selection_click (int clicks, int x, int y) NOTHROW; |
1462 | void selection_extend (int x, int y, int flag) NOTHROW; |
1418 | void selection_extend (int x, int y, int flag) NOTHROW; |
1463 | void selection_rotate (int x, int y) NOTHROW; |
1419 | void selection_rotate (int x, int y) NOTHROW; |
1464 | |
1420 | |
1465 | #if defined(NEXT_SCROLLBAR) |
|
|
1466 | // scrollbar-next.C |
|
|
1467 | Pixmap renderPixmap (const char *const *data, int width, int height); |
|
|
1468 | void init_scrollbar_stuff (); |
|
|
1469 | void drawBevel (Drawable d, int x1, int y1, int w, int h); |
|
|
1470 | int scrollbar_show_next (int update, int last_top, int last_bot, int scrollbar_len); |
|
|
1471 | #endif |
|
|
1472 | |
|
|
1473 | #if defined(RXVT_SCROLLBAR) |
|
|
1474 | // scrollbar-rxvt.C |
|
|
1475 | int scrollbar_show_rxvt (int update, int last_top, int last_bot, int scrollbar_len); |
|
|
1476 | #endif |
|
|
1477 | |
|
|
1478 | #if defined(XTERM_SCROLLBAR) |
|
|
1479 | // scrollbar-xterm.C |
|
|
1480 | int scrollbar_show_xterm (int update, int last_top, int last_bot, int scrollbar_len); |
|
|
1481 | #endif |
|
|
1482 | |
|
|
1483 | #if defined(PLAIN_SCROLLBAR) |
|
|
1484 | // scrollbar-plain.C |
|
|
1485 | int scrollbar_show_plain (int update, int last_top, int last_bot, int scrollbar_len); |
|
|
1486 | #endif |
|
|
1487 | |
|
|
1488 | // scrollbar.C |
|
|
1489 | void resize_scrollbar (); |
|
|
1490 | int scrollbar_mapping (int map); |
|
|
1491 | int scrollbar_show (int update); |
|
|
1492 | void setup_scrollbar (const char *scrollalign, const char *scrollstyle, const char *thickness); |
|
|
1493 | |
|
|
1494 | // xdefaults.C |
1421 | // xdefaults.C |
1495 | void get_options (int argc, const char *const *argv); |
1422 | void get_options (int argc, const char *const *argv); |
1496 | int parse_keysym (const char *str, const char *arg); |
1423 | int parse_keysym (const char *str, const char *arg); |
1497 | const char *x_resource (const char *name); |
1424 | const char *x_resource (const char *name); |
1498 | void extract_resources (); |
1425 | void extract_resources (); |