… | |
… | |
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 | |
… | |
… | |
209 | ***************************************************************************** |
200 | ***************************************************************************** |
210 | * STRUCTURES AND TYPEDEFS |
201 | * STRUCTURES AND TYPEDEFS |
211 | ***************************************************************************** |
202 | ***************************************************************************** |
212 | */ |
203 | */ |
213 | |
204 | |
214 | /* If we're using either the rxvt scrollbar, keep the |
|
|
215 | * scrollColor resource. |
|
|
216 | */ |
|
|
217 | #if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(PLAIN_SCROLLBAR) |
|
|
218 | # define KEEP_SCROLLCOLOR 1 |
|
|
219 | #else |
|
|
220 | # undef KEEP_SCROLLCOLOR |
|
|
221 | #endif |
|
|
222 | |
|
|
223 | /* |
205 | /* |
224 | * the 'essential' information for reporting Mouse Events |
206 | * the 'essential' information for reporting Mouse Events |
225 | * pared down from XButtonEvent |
207 | * pared down from XButtonEvent |
226 | */ |
208 | */ |
227 | struct mouse_event { |
209 | struct mouse_event { |
… | |
… | |
276 | #if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) |
258 | #if defined (NO_MOUSE_REPORT) && !defined (NO_MOUSE_REPORT_SCROLLBAR) |
277 | # define NO_MOUSE_REPORT_SCROLLBAR 1 |
259 | # define NO_MOUSE_REPORT_SCROLLBAR 1 |
278 | #endif |
260 | #endif |
279 | |
261 | |
280 | #define scrollBar_esc 30 |
262 | #define scrollBar_esc 30 |
281 | |
|
|
282 | #if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(XTERM_SCROLLBAR) || defined(PLAIN_SCROLLBAR) |
|
|
283 | # define HAVE_SCROLLBARS 1 |
|
|
284 | #endif |
|
|
285 | |
263 | |
286 | #if !defined (RXVT_SCROLLBAR) && !defined (NEXT_SCROLLBAR) |
264 | #if !defined (RXVT_SCROLLBAR) && !defined (NEXT_SCROLLBAR) |
287 | # define NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING 1 |
265 | # define NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING 1 |
288 | #endif |
266 | #endif |
289 | |
267 | |
… | |
… | |
441 | URxvt_boldItalicFont = 713, |
419 | URxvt_boldItalicFont = 713, |
442 | |
420 | |
443 | URxvt_view_up = 720, |
421 | URxvt_view_up = 720, |
444 | URxvt_view_down = 721, |
422 | URxvt_view_down = 721, |
445 | |
423 | |
446 | URxvt_perl = 777, |
424 | URxvt_perl = 777, // for use by perl extensions, starts with "extension-name;" |
447 | }; |
425 | }; |
448 | |
426 | |
449 | /* Words starting with `Color_' are colours. Others are counts */ |
427 | /* Words starting with `Color_' are colours. Others are counts */ |
450 | /* |
428 | /* |
451 | * The PixColor and rendition colour usage should probably be decoupled |
429 | * The PixColor and rendition colour usage should probably be decoupled |
… | |
… | |
501 | Color_underline, |
479 | Color_underline, |
502 | #endif |
480 | #endif |
503 | #ifdef OPTION_HC |
481 | #ifdef OPTION_HC |
504 | Color_HC, |
482 | Color_HC, |
505 | #endif |
483 | #endif |
506 | #ifdef KEEP_SCROLLCOLOR |
|
|
507 | Color_scroll, |
484 | Color_scroll, |
|
|
485 | #ifdef RXVT_SCROLLBAR |
508 | Color_trough, |
486 | Color_trough, |
509 | #endif |
487 | #endif |
510 | #if ENABLE_TRANSPARENCY |
488 | #if ENABLE_TRANSPARENCY |
511 | Color_tint, |
489 | Color_tint, |
512 | #endif |
490 | #endif |
513 | #if OFF_FOCUS_FADING |
491 | #if OFF_FOCUS_FADING |
514 | Color_fade, |
492 | Color_fade, |
515 | #endif |
493 | #endif |
516 | NRS_COLORS, /* */ |
494 | NRS_COLORS, /* */ |
517 | #ifdef KEEP_SCROLLCOLOR |
495 | #ifdef RXVT_SCROLLBAR |
518 | Color_topShadow = NRS_COLORS, |
496 | Color_topShadow = NRS_COLORS, |
519 | Color_bottomShadow, |
497 | Color_bottomShadow, |
520 | TOTAL_COLORS |
498 | TOTAL_COLORS |
521 | #else |
499 | #else |
522 | TOTAL_COLORS = NRS_COLORS |
500 | TOTAL_COLORS = NRS_COLORS |
… | |
… | |
823 | * +------------+·display·+·= term_start |
801 | * +------------+·display·+·= term_start |
824 | * | terminal | display | |
802 | * | terminal | display | |
825 | * | terminal +---------+ |
803 | * | terminal +---------+ |
826 | * | terminal | |
804 | * | terminal | |
827 | * | terminal | |
805 | * | terminal | |
828 | * +------------+···········= term_stat + nrow - 1 |
806 | * +------------+···········= term_start + nrow - 1 |
829 | * | |
807 | * | |
830 | * | |
808 | * | |
831 | * END······················= total_rows |
809 | * END······················= total_rows |
832 | */ |
810 | */ |
833 | |
811 | |
… | |
… | |
869 | * clicks: 1, 2 or 3 clicks - 4 indicates a special condition of 1 where |
847 | * clicks: 1, 2 or 3 clicks - 4 indicates a special condition of 1 where |
870 | * nothing is selected |
848 | * nothing is selected |
871 | * beg: row/column of beginning of selection : never past mark |
849 | * beg: row/column of beginning of selection : never past mark |
872 | * mark: row/column of initial click : never past end |
850 | * mark: row/column of initial click : never past end |
873 | * end: row/column of one character past end of selection |
851 | * end: row/column of one character past end of selection |
874 | * * Note: -nsaved <= beg.row <= mark.row <= end.row < nrow |
852 | * * Note: top_row <= beg.row <= mark.row <= end.row < nrow |
875 | * * Note: col == -1 ==> we're left of screen |
853 | * * Note: col == -1 ==> we're left of screen |
876 | * |
854 | * |
877 | */ |
855 | */ |
878 | typedef struct { |
856 | typedef struct { |
879 | row_col_t cur; /* cursor position on the screen */ |
857 | row_col_t cur; /* cursor position on the screen */ |
… | |
… | |
1012 | mouse_slip_wheel_speed, |
990 | mouse_slip_wheel_speed, |
1013 | #endif |
991 | #endif |
1014 | refresh_count, |
992 | refresh_count, |
1015 | window_vt_x, |
993 | window_vt_x, |
1016 | window_vt_y, |
994 | window_vt_y, |
1017 | window_sb_x, |
|
|
1018 | mouse_row, |
995 | mouse_row, |
1019 | mouse_col, |
996 | mouse_col, |
1020 | # ifdef POINTER_BLANK |
997 | # ifdef POINTER_BLANK |
1021 | pointerBlankDelay, |
998 | pointerBlankDelay, |
1022 | # endif |
999 | # endif |
… | |
… | |
1030 | unsigned long priv_modes, |
1007 | unsigned long priv_modes, |
1031 | SavedModes; |
1008 | SavedModes; |
1032 | /* ---------- */ |
1009 | /* ---------- */ |
1033 | Atom *xa; |
1010 | Atom *xa; |
1034 | /* ---------- */ |
1011 | /* ---------- */ |
1035 | #ifdef RXVT_SCROLLBAR |
|
|
1036 | GC scrollbarGC, |
|
|
1037 | topShadowGC, |
|
|
1038 | botShadowGC; |
|
|
1039 | #endif |
|
|
1040 | #ifdef XTERM_SCROLLBAR |
|
|
1041 | GC xscrollbarGC, |
|
|
1042 | ShadowGC; |
|
|
1043 | #endif |
|
|
1044 | #ifdef PLAIN_SCROLLBAR |
|
|
1045 | GC pscrollbarGC; |
|
|
1046 | #endif |
|
|
1047 | #ifdef NEXT_SCROLLBAR |
|
|
1048 | GC blackGC, |
|
|
1049 | whiteGC, |
|
|
1050 | grayGC, |
|
|
1051 | darkGC, |
|
|
1052 | stippleGC; |
|
|
1053 | Pixmap dimple, |
|
|
1054 | upArrow, |
|
|
1055 | downArrow, |
|
|
1056 | upArrowHi, |
|
|
1057 | downArrowHi; |
|
|
1058 | #endif |
|
|
1059 | /* ---------- */ |
|
|
1060 | Time selection_time, |
1012 | Time selection_time, |
1061 | selection_request_time; |
1013 | selection_request_time; |
1062 | pid_t cmd_pid; /* process id of child */ |
1014 | pid_t cmd_pid; /* process id of child */ |
1063 | char * incr_buf; |
1015 | char * incr_buf; |
1064 | size_t incr_buf_size, incr_buf_fill; |
1016 | size_t incr_buf_size, incr_buf_fill; |
… | |
… | |
1124 | |
1076 | |
1125 | #if ENABLE_FRILLS || ISO_14755 |
1077 | #if ENABLE_FRILLS || ISO_14755 |
1126 | // ISO 14755 entry support |
1078 | // ISO 14755 entry support |
1127 | unicode_t iso14755buf; |
1079 | unicode_t iso14755buf; |
1128 | void commit_iso14755 (); |
1080 | void commit_iso14755 (); |
1129 | int hex_keyval (XKeyEvent &ev); |
|
|
1130 | # if ISO_14755 |
1081 | # if ISO_14755 |
1131 | 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); |
1132 | void iso14755_54 (int x, int y); |
1083 | void iso14755_54 (int x, int y); |
1133 | # endif |
1084 | # endif |
1134 | #endif |
1085 | #endif |
… | |
… | |
1155 | #endif |
1106 | #endif |
1156 | |
1107 | |
1157 | void x_cb (XEvent &xev); |
1108 | void x_cb (XEvent &xev); |
1158 | xevent_watcher termwin_ev; |
1109 | xevent_watcher termwin_ev; |
1159 | xevent_watcher vt_ev; |
1110 | xevent_watcher vt_ev; |
1160 | #ifdef HAVE_SCROLLBARS |
|
|
1161 | xevent_watcher scrollbar_ev; |
1111 | xevent_watcher scrollbar_ev; |
1162 | #endif |
|
|
1163 | |
1112 | |
1164 | 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; |
1165 | 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; |
1166 | void refresh_check (); |
1115 | void refresh_check (); |
1167 | void flush (); |
1116 | void flush (); |
… | |
… | |
1278 | void init_command (const char *const *argv); |
1227 | void init_command (const char *const *argv); |
1279 | void run_command (const char *const *argv); |
1228 | void run_command (const char *const *argv); |
1280 | int run_child (const char *const *argv); |
1229 | int run_child (const char *const *argv); |
1281 | void color_aliases (int idx); |
1230 | void color_aliases (int idx); |
1282 | void create_windows (int argc, const char *const *argv); |
1231 | void create_windows (int argc, const char *const *argv); |
1283 | void Get_Colours (); |
1232 | void get_colours (); |
1284 | void get_ourmods (); |
1233 | void get_ourmods (); |
1285 | // main.C |
1234 | // main.C |
1286 | void tt_winch (); |
1235 | void tt_winch (); |
1287 | rxvt_term (); |
1236 | rxvt_term (); |
1288 | ~rxvt_term (); |
1237 | ~rxvt_term (); |
… | |
… | |
1381 | options[opt >> 3] |= (1 << (opt & 7)); |
1330 | options[opt >> 3] |= (1 << (opt & 7)); |
1382 | else |
1331 | else |
1383 | options[opt >> 3] &= ~(1 << (opt & 7)); |
1332 | options[opt >> 3] &= ~(1 << (opt & 7)); |
1384 | } |
1333 | } |
1385 | |
1334 | |
1386 | void PrivMode (int set, unsigned bit) NOTHROW |
1335 | void set_privmode (unsigned bit, int set) NOTHROW |
1387 | { |
1336 | { |
1388 | if (set) |
1337 | if (set) |
1389 | priv_modes |= bit; |
1338 | priv_modes |= bit; |
1390 | else |
1339 | else |
1391 | priv_modes &= ~bit; |
1340 | priv_modes &= ~bit; |
… | |
… | |
1467 | void selection_send (const XSelectionRequestEvent &rq) NOTHROW; |
1416 | void selection_send (const XSelectionRequestEvent &rq) NOTHROW; |
1468 | void selection_click (int clicks, int x, int y) NOTHROW; |
1417 | void selection_click (int clicks, int x, int y) NOTHROW; |
1469 | void selection_extend (int x, int y, int flag) NOTHROW; |
1418 | void selection_extend (int x, int y, int flag) NOTHROW; |
1470 | void selection_rotate (int x, int y) NOTHROW; |
1419 | void selection_rotate (int x, int y) NOTHROW; |
1471 | |
1420 | |
1472 | #if defined(NEXT_SCROLLBAR) |
|
|
1473 | // scrollbar-next.C |
|
|
1474 | Pixmap renderPixmap (const char *const *data, int width, int height); |
|
|
1475 | void init_scrollbar_stuff (); |
|
|
1476 | void drawBevel (Drawable d, int x1, int y1, int w, int h); |
|
|
1477 | int scrollbar_show_next (int update, int last_top, int last_bot, int scrollbar_len); |
|
|
1478 | #endif |
|
|
1479 | |
|
|
1480 | #if defined(RXVT_SCROLLBAR) |
|
|
1481 | // scrollbar-rxvt.C |
|
|
1482 | int scrollbar_show_rxvt (int update, int last_top, int last_bot, int scrollbar_len); |
|
|
1483 | #endif |
|
|
1484 | |
|
|
1485 | #if defined(XTERM_SCROLLBAR) |
|
|
1486 | // scrollbar-xterm.C |
|
|
1487 | int scrollbar_show_xterm (int update, int last_top, int last_bot, int scrollbar_len); |
|
|
1488 | #endif |
|
|
1489 | |
|
|
1490 | #if defined(PLAIN_SCROLLBAR) |
|
|
1491 | // scrollbar-plain.C |
|
|
1492 | int scrollbar_show_plain (int update, int last_top, int last_bot, int scrollbar_len); |
|
|
1493 | #endif |
|
|
1494 | |
|
|
1495 | // scrollbar.C |
|
|
1496 | void resize_scrollbar (); |
|
|
1497 | int scrollbar_mapping (int map); |
|
|
1498 | int scrollbar_show (int update); |
|
|
1499 | void setup_scrollbar (const char *scrollalign, const char *scrollstyle, const char *thickness); |
|
|
1500 | |
|
|
1501 | // xdefaults.C |
1421 | // xdefaults.C |
1502 | void get_options (int argc, const char *const *argv); |
1422 | void get_options (int argc, const char *const *argv); |
1503 | int parse_keysym (const char *str, const char *arg); |
1423 | int parse_keysym (const char *str, const char *arg); |
1504 | const char *x_resource (const char *name); |
1424 | const char *x_resource (const char *name); |
1505 | void extract_resources (); |
1425 | void extract_resources (); |