… | |
… | |
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 { |
… | |
… | |
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 | |
263 | |
282 | #if defined(RXVT_SCROLLBAR) || defined(NEXT_SCROLLBAR) || defined(XTERM_SCROLLBAR) || defined(PLAIN_SCROLLBAR) |
264 | #if !defined (RXVT_SCROLLBAR) && !defined (NEXT_SCROLLBAR) |
283 | # define HAVE_SCROLLBARS 1 |
265 | # define NO_SCROLLBAR_BUTTON_CONTINUAL_SCROLLING 1 |
284 | #endif |
266 | #endif |
285 | |
267 | |
286 | enum { |
268 | enum { |
287 | NO_REFRESH = 0, /* Window not visible at all! */ |
269 | NO_REFRESH = 0, /* Window not visible at all! */ |
288 | FAST_REFRESH = 1, /* Fully exposed window */ |
270 | FAST_REFRESH = 1, /* Fully exposed window */ |
… | |
… | |
394 | XTerm_name = 0, |
376 | XTerm_name = 0, |
395 | XTerm_iconName = 1, |
377 | XTerm_iconName = 1, |
396 | XTerm_title = 2, |
378 | XTerm_title = 2, |
397 | XTerm_property = 3, // change X property |
379 | XTerm_property = 3, // change X property |
398 | XTerm_Color = 4, // change colors |
380 | XTerm_Color = 4, // change colors |
399 | XTerm_Color00 = 10, // not implemented, CLASH! |
381 | XTerm_Color00 = 10, // change fg color |
400 | XTerm_Color01 = 11, // not implemented |
382 | XTerm_Color01 = 11, // change bg color |
401 | XTerm_Color_cursor = 12, // change actual 'Cursor' color |
383 | XTerm_Color_cursor = 12, // change actual 'Cursor' color |
402 | XTerm_Color_pointer_fg = 13, // change actual 'Pointer' fg color |
384 | XTerm_Color_pointer_fg = 13, // change actual 'Pointer' fg color |
403 | XTerm_Color_pointer_bg = 14, // change actual 'Pointer' bg color |
385 | XTerm_Color_pointer_bg = 14, // change actual 'Pointer' bg color |
404 | XTerm_Color05 = 15, // not implemented (tektronix fg) |
386 | XTerm_Color05 = 15, // not implemented (tektronix fg) |
405 | XTerm_Color06 = 16, // not implemented (tektronix bg) |
387 | XTerm_Color06 = 16, // not implemented (tektronix bg) |
… | |
… | |
410 | XTerm_konsole30 = 30, // reserved for konsole |
392 | XTerm_konsole30 = 30, // reserved for konsole |
411 | XTerm_konsole31 = 31, // reserved for konsole |
393 | XTerm_konsole31 = 31, // reserved for konsole |
412 | XTerm_emacs51 = 51, // reserved for emacs shell |
394 | XTerm_emacs51 = 51, // reserved for emacs shell |
413 | /* |
395 | /* |
414 | * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL) |
396 | * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL) |
415 | * at least Rxvt_Color_BD and Rxvt_Color_UL clash with xterm |
|
|
416 | */ |
397 | */ |
417 | Rxvt_Color_BD = 18, // change actual 'Bold' color |
398 | |
418 | Rxvt_Color_UL = 19, // change actual 'Underline' color |
399 | // deprecated |
|
|
400 | Rxvt_Color_BD = 18, |
|
|
401 | Rxvt_Color_UL = 19, |
|
|
402 | Rxvt_restoreFG = 39, |
|
|
403 | Rxvt_restoreBG = 49, |
|
|
404 | |
419 | Rxvt_Pixmap = 20, // new bg pixmap |
405 | Rxvt_Pixmap = 20, // new bg pixmap |
420 | Rxvt_restoreFG = 39, // change default fg color |
|
|
421 | Rxvt_restoreBG = 49, // change default bg color |
|
|
422 | Rxvt_dumpscreen = 55, // dump scrollback and all of screen |
406 | Rxvt_dumpscreen = 55, // dump scrollback and all of screen |
423 | |
407 | |
424 | URxvt_locale = 701, // change locale |
408 | URxvt_locale = 701, // change locale |
425 | URxvt_version = 702, // request version |
409 | URxvt_version = 702, // request version |
426 | |
410 | |
427 | URxvt_Color_IT = 704, // change actual 'Italic' colour |
411 | URxvt_Color_IT = 704, // change actual 'Italic' colour |
428 | URxvt_Color_tint = 705, // change actual tint colour |
412 | URxvt_Color_tint = 705, // change actual tint colour |
429 | URxvt_Color_BD = 706, |
413 | URxvt_Color_BD = 706, // change actual 'Bold' color |
430 | URxvt_Color_UL = 707, |
414 | URxvt_Color_UL = 707, // change actual 'Underline' color |
431 | |
415 | |
432 | URxvt_font = 710, |
416 | URxvt_font = 710, |
433 | URxvt_boldFont = 711, |
417 | URxvt_boldFont = 711, |
434 | URxvt_italicFont = 712, |
418 | URxvt_italicFont = 712, |
435 | URxvt_boldItalicFont = 713, |
419 | URxvt_boldItalicFont = 713, |
… | |
… | |
495 | Color_underline, |
479 | Color_underline, |
496 | #endif |
480 | #endif |
497 | #ifdef OPTION_HC |
481 | #ifdef OPTION_HC |
498 | Color_HC, |
482 | Color_HC, |
499 | #endif |
483 | #endif |
500 | #ifdef KEEP_SCROLLCOLOR |
|
|
501 | Color_scroll, |
484 | Color_scroll, |
|
|
485 | #ifdef RXVT_SCROLLBAR |
502 | Color_trough, |
486 | Color_trough, |
503 | #endif |
487 | #endif |
504 | #if ENABLE_TRANSPARENCY |
488 | #if ENABLE_TRANSPARENCY |
505 | Color_tint, |
489 | Color_tint, |
506 | #endif |
490 | #endif |
507 | #if OFF_FOCUS_FADING |
491 | #if OFF_FOCUS_FADING |
508 | Color_fade, |
492 | Color_fade, |
509 | #endif |
493 | #endif |
510 | NRS_COLORS, /* */ |
494 | NRS_COLORS, /* */ |
511 | #ifdef KEEP_SCROLLCOLOR |
495 | #ifdef RXVT_SCROLLBAR |
512 | Color_topShadow = NRS_COLORS, |
496 | Color_topShadow = NRS_COLORS, |
513 | Color_bottomShadow, |
497 | Color_bottomShadow, |
514 | TOTAL_COLORS |
498 | TOTAL_COLORS |
515 | #else |
499 | #else |
516 | TOTAL_COLORS = NRS_COLORS |
500 | TOTAL_COLORS = NRS_COLORS |
… | |
… | |
552 | #define PrivMode_smoothScroll (1UL<<17) |
536 | #define PrivMode_smoothScroll (1UL<<17) |
553 | #define PrivMode_vt52 (1UL<<18) |
537 | #define PrivMode_vt52 (1UL<<18) |
554 | #define PrivMode_LFNL (1UL<<19) |
538 | #define PrivMode_LFNL (1UL<<19) |
555 | #define PrivMode_MouseBtnEvent (1UL<<20) |
539 | #define PrivMode_MouseBtnEvent (1UL<<20) |
556 | #define PrivMode_MouseAnyEvent (1UL<<21) |
540 | #define PrivMode_MouseAnyEvent (1UL<<21) |
|
|
541 | #define PrivMode_BracketPaste (1UL<<22) |
557 | |
542 | |
558 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent) |
543 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent) |
559 | |
544 | |
560 | #ifdef ALLOW_132_MODE |
545 | #ifdef ALLOW_132_MODE |
561 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
546 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
… | |
… | |
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 |
… | |
… | |
1054 | selection_request_time; |
1038 | selection_request_time; |
1055 | pid_t cmd_pid; /* process id of child */ |
1039 | pid_t cmd_pid; /* process id of child */ |
1056 | char * incr_buf; |
1040 | char * incr_buf; |
1057 | size_t incr_buf_size, incr_buf_fill; |
1041 | size_t incr_buf_size, incr_buf_fill; |
1058 | /* ---------- */ |
1042 | /* ---------- */ |
1059 | Cursor leftptr_cursor; |
|
|
1060 | /* ---------- */ |
|
|
1061 | struct mouse_event MEvent; |
1043 | struct mouse_event MEvent; |
1062 | XComposeStatus compose; |
1044 | XComposeStatus compose; |
1063 | struct termios tio; |
1045 | struct termios tio; |
1064 | row_col_t oldcursor; |
1046 | row_col_t oldcursor; |
1065 | #ifdef HAVE_BG_PIXMAP |
1047 | #ifdef HAVE_BG_PIXMAP |
… | |
… | |
1119 | |
1101 | |
1120 | #if ENABLE_FRILLS || ISO_14755 |
1102 | #if ENABLE_FRILLS || ISO_14755 |
1121 | // ISO 14755 entry support |
1103 | // ISO 14755 entry support |
1122 | unicode_t iso14755buf; |
1104 | unicode_t iso14755buf; |
1123 | void commit_iso14755 (); |
1105 | void commit_iso14755 (); |
1124 | int hex_keyval (XKeyEvent &ev); |
|
|
1125 | # if ISO_14755 |
1106 | # if ISO_14755 |
1126 | void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE, int x = 0, int y = -1); |
1107 | void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE, int x = 0, int y = -1); |
1127 | void iso14755_54 (int x, int y); |
1108 | void iso14755_54 (int x, int y); |
1128 | # endif |
1109 | # endif |
1129 | #endif |
1110 | #endif |
… | |
… | |
1150 | #endif |
1131 | #endif |
1151 | |
1132 | |
1152 | void x_cb (XEvent &xev); |
1133 | void x_cb (XEvent &xev); |
1153 | xevent_watcher termwin_ev; |
1134 | xevent_watcher termwin_ev; |
1154 | xevent_watcher vt_ev; |
1135 | xevent_watcher vt_ev; |
1155 | #ifdef HAVE_SCROLLBARS |
|
|
1156 | xevent_watcher scrollbar_ev; |
1136 | xevent_watcher scrollbar_ev; |
1157 | #endif |
|
|
1158 | |
1137 | |
1159 | void child_cb (ev::child &w, int revents); ev::child child_ev; |
1138 | void child_cb (ev::child &w, int revents); ev::child child_ev; |
1160 | void destroy_cb (ev::idle &w, int revents); ev::idle destroy_ev; |
1139 | void destroy_cb (ev::idle &w, int revents); ev::idle destroy_ev; |
1161 | void refresh_check (); |
1140 | void refresh_check (); |
1162 | void flush (); |
1141 | void flush (); |
… | |
… | |
1263 | void process_terminal_mode (int mode, int priv, unsigned int nargs, const int *arg); |
1242 | void process_terminal_mode (int mode, int priv, unsigned int nargs, const int *arg); |
1264 | void process_sgr_mode (unsigned int nargs, const int *arg); |
1243 | void process_sgr_mode (unsigned int nargs, const int *arg); |
1265 | void process_graphics (); |
1244 | void process_graphics (); |
1266 | // init.C |
1245 | // init.C |
1267 | void init_vars (); |
1246 | void init_vars (); |
1268 | void init_secondary (); |
|
|
1269 | const char **init_resources (int argc, const char *const *argv); |
1247 | const char **init_resources (int argc, const char *const *argv); |
|
|
1248 | void init (int argc, const char *const *argv, stringvec *envv); |
1270 | void init_env (); |
1249 | void init_env (); |
1271 | void set_locale (const char *locale); |
1250 | void set_locale (const char *locale); |
1272 | void init_xlocale (); |
1251 | void init_xlocale (); |
1273 | void init_command (const char *const *argv); |
1252 | void init_command (const char *const *argv); |
1274 | void run_command (const char *const *argv); |
1253 | void run_command (const char *const *argv); |
… | |
… | |
1281 | void tt_winch (); |
1260 | void tt_winch (); |
1282 | rxvt_term (); |
1261 | rxvt_term (); |
1283 | ~rxvt_term (); |
1262 | ~rxvt_term (); |
1284 | void destroy (); |
1263 | void destroy (); |
1285 | void emergency_cleanup (); |
1264 | void emergency_cleanup (); |
1286 | void init (int argc, const char *const *argv, stringvec *envv); |
|
|
1287 | void recolour_cursor (); |
1265 | void recolour_cursor (); |
1288 | void resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent); |
1266 | void resize_all_windows (unsigned int newwidth, unsigned int newheight, int ignoreparent); |
1289 | void window_calc (unsigned int newwidth, unsigned int newheight); |
1267 | void window_calc (unsigned int newwidth, unsigned int newheight); |
1290 | bool set_fonts (); |
1268 | bool set_fonts (); |
1291 | void set_string_property (Atom prop, const char *str, int len = -1); |
1269 | void set_string_property (Atom prop, const char *str, int len = -1); |
… | |
… | |
1377 | options[opt >> 3] |= (1 << (opt & 7)); |
1355 | options[opt >> 3] |= (1 << (opt & 7)); |
1378 | else |
1356 | else |
1379 | options[opt >> 3] &= ~(1 << (opt & 7)); |
1357 | options[opt >> 3] &= ~(1 << (opt & 7)); |
1380 | } |
1358 | } |
1381 | |
1359 | |
1382 | void PrivMode (int set, unsigned bit) NOTHROW |
1360 | void set_privmode (unsigned bit, int set) NOTHROW |
1383 | { |
1361 | { |
1384 | if (set) |
1362 | if (set) |
1385 | priv_modes |= bit; |
1363 | priv_modes |= bit; |
1386 | else |
1364 | else |
1387 | priv_modes &= ~bit; |
1365 | priv_modes &= ~bit; |
… | |
… | |
1490 | |
1468 | |
1491 | // scrollbar.C |
1469 | // scrollbar.C |
1492 | void resize_scrollbar (); |
1470 | void resize_scrollbar (); |
1493 | int scrollbar_mapping (int map); |
1471 | int scrollbar_mapping (int map); |
1494 | int scrollbar_show (int update); |
1472 | int scrollbar_show (int update); |
1495 | void setup_scrollbar (const char *scrollalign, const char *scrollstyle, const char *thickness); |
|
|
1496 | |
1473 | |
1497 | // xdefaults.C |
1474 | // xdefaults.C |
1498 | void get_options (int argc, const char *const *argv); |
1475 | void get_options (int argc, const char *const *argv); |
1499 | int parse_keysym (const char *str, const char *arg); |
1476 | int parse_keysym (const char *str, const char *arg); |
1500 | const char *x_resource (const char *name); |
1477 | const char *x_resource (const char *name); |