… | |
… | |
76 | |
76 | |
77 | #include "encoding.h" |
77 | #include "encoding.h" |
78 | #include "rxvtutil.h" |
78 | #include "rxvtutil.h" |
79 | #include "rxvtfont.h" |
79 | #include "rxvtfont.h" |
80 | #include "rxvttoolkit.h" |
80 | #include "rxvttoolkit.h" |
|
|
81 | #include "scrollbar.h" |
81 | #include "ev_cpp.h" |
82 | #include "ev_cpp.h" |
82 | #include "salloc.h" |
83 | #include "salloc.h" |
83 | #include "libptytty.h" |
84 | #include "libptytty.h" |
84 | |
85 | |
85 | #include "rxvtperl.h" |
86 | #include "rxvtperl.h" |
… | |
… | |
96 | /* |
97 | /* |
97 | ***************************************************************************** |
98 | ***************************************************************************** |
98 | * SYSTEM HACKS |
99 | * SYSTEM HACKS |
99 | ***************************************************************************** |
100 | ***************************************************************************** |
100 | */ |
101 | */ |
101 | /* Consistent defines - please report on the necessity |
|
|
102 | * @ Unixware: defines (__svr4__) |
|
|
103 | */ |
|
|
104 | #if defined (SVR4) && !defined (__svr4__) |
|
|
105 | # define __svr4__ 1 |
|
|
106 | #endif |
|
|
107 | #if defined (sun) && !defined (__sun__) |
|
|
108 | # define __sun__ 1 |
|
|
109 | #endif |
|
|
110 | |
102 | |
111 | #ifndef HAVE_XPOINTER |
103 | #ifndef HAVE_XPOINTER |
112 | typedef char *XPointer; |
104 | typedef char *XPointer; |
113 | #endif |
105 | #endif |
114 | |
106 | |
115 | #include <termios.h> |
107 | #include <termios.h> |
116 | typedef struct termios ttymode_t; |
|
|
117 | |
108 | |
118 | #include "background.h" |
109 | #include "background.h" |
119 | |
110 | |
120 | #ifndef STDIN_FILENO |
111 | #ifndef STDIN_FILENO |
121 | # define STDIN_FILENO 0 |
112 | # define STDIN_FILENO 0 |
… | |
… | |
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 | |
|
|
286 | #define R_SB_ALIGN_CENTRE 0 |
|
|
287 | #define R_SB_ALIGN_TOP 1 |
|
|
288 | #define R_SB_ALIGN_BOTTOM 2 |
|
|
289 | |
|
|
290 | #define R_SB_NEXT 1 |
|
|
291 | #define R_SB_XTERM 2 |
|
|
292 | #define R_SB_PLAIN 4 |
|
|
293 | #define R_SB_RXVT 8 |
|
|
294 | |
|
|
295 | #define SB_WIDTH_NEXT 19 |
|
|
296 | #define SB_WIDTH_XTERM 15 |
|
|
297 | #define SB_WIDTH_PLAIN 7 |
|
|
298 | #ifndef SB_WIDTH_RXVT |
|
|
299 | # define SB_WIDTH_RXVT 10 |
|
|
300 | #endif |
|
|
301 | |
|
|
302 | /* |
|
|
303 | * NeXT scrollbar defines |
|
|
304 | */ |
|
|
305 | #define SB_PADDING 1 |
|
|
306 | #define SB_BORDER_WIDTH 1 |
|
|
307 | #define SB_BEVEL_WIDTH_UPPER_LEFT 1 |
|
|
308 | #define SB_BEVEL_WIDTH_LOWER_RIGHT 2 |
|
|
309 | #define SB_LEFT_PADDING (SB_PADDING + SB_BORDER_WIDTH) |
|
|
310 | #define SB_MARGIN_SPACE (SB_PADDING * 2) |
|
|
311 | #define SB_BUTTON_WIDTH (SB_WIDTH_NEXT - SB_MARGIN_SPACE - SB_BORDER_WIDTH) |
|
|
312 | #define SB_BUTTON_HEIGHT (SB_BUTTON_WIDTH) |
|
|
313 | #define SB_BUTTON_SINGLE_HEIGHT (SB_BUTTON_HEIGHT + SB_PADDING) |
|
|
314 | #define SB_BUTTON_BOTH_HEIGHT (SB_BUTTON_SINGLE_HEIGHT * 2) |
|
|
315 | #define SB_BUTTON_TOTAL_HEIGHT (SB_BUTTON_BOTH_HEIGHT + SB_PADDING) |
|
|
316 | #define SB_BUTTON_BEVEL_X (SB_LEFT_PADDING) |
|
|
317 | #define SB_BUTTON_FACE_X (SB_BUTTON_BEVEL_X + SB_BEVEL_WIDTH_UPPER_LEFT) |
|
|
318 | #define SB_THUMB_MIN_HEIGHT (SB_BUTTON_WIDTH - (SB_PADDING * 2)) |
|
|
319 | /* |
|
|
320 | * +-------------+ |
|
|
321 | * | | <---< SB_PADDING |
|
|
322 | * | ::::::::::: | |
|
|
323 | * | ::::::::::: | |
|
|
324 | * ''''''''''''''''' |
|
|
325 | * ,,,,,,,,,,,,,,,,, |
|
|
326 | * | ::::::::::: | |
|
|
327 | * | ::::::::::: | |
|
|
328 | * | +---------------< SB_BEVEL_WIDTH_UPPER_LEFT |
|
|
329 | * | | :::::::: | |
|
|
330 | * | V :::: vv-------< SB_BEVEL_WIDTH_LOWER_RIGHT |
|
|
331 | * | +---------+ | |
|
|
332 | * | | ......%%| | |
|
|
333 | * | | ......%%| | |
|
|
334 | * | | .. ()..%%| | |
|
|
335 | * | | ......%%| | |
|
|
336 | * | | %%%%%%%%| | |
|
|
337 | * | +---------+ | <......................... |
|
|
338 | * | | <---< SB_PADDING : |
|
|
339 | * | +---------+ | <-+.......... :---< SB_BUTTON_TOTAL_HEIGHT |
|
|
340 | * | | ......%%| | | : : |
|
|
341 | * | | ../\..%%| | |---< SB_BUTTON_HEIGHT : |
|
|
342 | * | | %%%%%%%%| | | : : |
|
|
343 | * | +---------+ | <-+ : : |
|
|
344 | * | | : : |
|
|
345 | * | +---------+ | <-+ :---< SB_BUTTON_BOTH_HEIGHT |
|
|
346 | * | | ......%%| | | : : |
|
|
347 | * | | ..\/..%%| | | : : |
|
|
348 | * | | %%%%%%%%| | |---< SB_BUTTON_SINGLE_HEIGHT |
|
|
349 | * | +---------+ | | : : |
|
|
350 | * | | | : : |
|
|
351 | * +-------------+ <-+.........:............: |
|
|
352 | * ^^|_________| : |
|
|
353 | * || | : |
|
|
354 | * || +---< SB_BUTTON_WIDTH |
|
|
355 | * || : |
|
|
356 | * |+------< SB_PADDING |
|
|
357 | * |: : |
|
|
358 | * +----< SB_BORDER_WIDTH |
|
|
359 | * : : |
|
|
360 | * :............: |
|
|
361 | * | |
|
|
362 | * +---< SB_WIDTH_NEXT |
|
|
363 | */ |
|
|
364 | |
267 | |
365 | enum { |
268 | enum { |
366 | NO_REFRESH = 0, /* Window not visible at all! */ |
269 | NO_REFRESH = 0, /* Window not visible at all! */ |
367 | FAST_REFRESH = 1, /* Fully exposed window */ |
270 | FAST_REFRESH = 1, /* Fully exposed window */ |
368 | SLOW_REFRESH = 2, /* Partially exposed window */ |
271 | SLOW_REFRESH = 2, /* Partially exposed window */ |
… | |
… | |
473 | XTerm_name = 0, |
376 | XTerm_name = 0, |
474 | XTerm_iconName = 1, |
377 | XTerm_iconName = 1, |
475 | XTerm_title = 2, |
378 | XTerm_title = 2, |
476 | XTerm_property = 3, // change X property |
379 | XTerm_property = 3, // change X property |
477 | XTerm_Color = 4, // change colors |
380 | XTerm_Color = 4, // change colors |
478 | XTerm_Color00 = 10, // not implemented, CLASH! |
381 | XTerm_Color00 = 10, // change fg color |
479 | XTerm_Color01 = 11, // not implemented |
382 | XTerm_Color01 = 11, // change bg color |
480 | XTerm_Color_cursor = 12, // change actual 'Cursor' color |
383 | XTerm_Color_cursor = 12, // change actual 'Cursor' color |
481 | XTerm_Color_pointer_fg = 13, // change actual 'Pointer' fg color |
384 | XTerm_Color_pointer_fg = 13, // change actual 'Pointer' fg color |
482 | XTerm_Color_pointer_bg = 14, // change actual 'Pointer' bg color |
385 | XTerm_Color_pointer_bg = 14, // change actual 'Pointer' bg color |
483 | XTerm_Color05 = 15, // not implemented (tektronix fg) |
386 | XTerm_Color05 = 15, // not implemented (tektronix fg) |
484 | XTerm_Color06 = 16, // not implemented (tektronix bg) |
387 | XTerm_Color06 = 16, // not implemented (tektronix bg) |
… | |
… | |
489 | XTerm_konsole30 = 30, // reserved for konsole |
392 | XTerm_konsole30 = 30, // reserved for konsole |
490 | XTerm_konsole31 = 31, // reserved for konsole |
393 | XTerm_konsole31 = 31, // reserved for konsole |
491 | XTerm_emacs51 = 51, // reserved for emacs shell |
394 | XTerm_emacs51 = 51, // reserved for emacs shell |
492 | /* |
395 | /* |
493 | * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL) |
396 | * rxvt extensions of XTerm OSCs: ESC ] Ps;Pt (ST|BEL) |
494 | * at least Rxvt_Color_BD and Rxvt_Color_UL clash with xterm |
|
|
495 | */ |
397 | */ |
496 | Rxvt_Color_BD = 18, // change actual 'Bold' color |
398 | |
497 | 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 | |
498 | Rxvt_Pixmap = 20, // new bg pixmap |
405 | Rxvt_Pixmap = 20, // new bg pixmap |
499 | Rxvt_restoreFG = 39, // change default fg color |
|
|
500 | Rxvt_restoreBG = 49, // change default bg color |
|
|
501 | Rxvt_dumpscreen = 55, // dump scrollback and all of screen |
406 | Rxvt_dumpscreen = 55, // dump scrollback and all of screen |
502 | |
407 | |
503 | URxvt_locale = 701, // change locale |
408 | URxvt_locale = 701, // change locale |
504 | URxvt_version = 702, // request version |
409 | URxvt_version = 702, // request version |
505 | |
410 | |
506 | URxvt_Color_IT = 704, // change actual 'Italic' colour |
411 | URxvt_Color_IT = 704, // change actual 'Italic' colour |
507 | URxvt_Color_tint = 705, // change actual tint colour |
412 | URxvt_Color_tint = 705, // change actual tint colour |
508 | URxvt_Color_BD = 706, |
413 | URxvt_Color_BD = 706, // change actual 'Bold' color |
509 | URxvt_Color_UL = 707, |
414 | URxvt_Color_UL = 707, // change actual 'Underline' color |
510 | |
415 | |
511 | URxvt_font = 710, |
416 | URxvt_font = 710, |
512 | URxvt_boldFont = 711, |
417 | URxvt_boldFont = 711, |
513 | URxvt_italicFont = 712, |
418 | URxvt_italicFont = 712, |
514 | URxvt_boldItalicFont = 713, |
419 | URxvt_boldItalicFont = 713, |
… | |
… | |
574 | Color_underline, |
479 | Color_underline, |
575 | #endif |
480 | #endif |
576 | #ifdef OPTION_HC |
481 | #ifdef OPTION_HC |
577 | Color_HC, |
482 | Color_HC, |
578 | #endif |
483 | #endif |
579 | #ifdef KEEP_SCROLLCOLOR |
|
|
580 | Color_scroll, |
484 | Color_scroll, |
|
|
485 | #ifdef RXVT_SCROLLBAR |
581 | Color_trough, |
486 | Color_trough, |
582 | #endif |
487 | #endif |
583 | #if ENABLE_TRANSPARENCY |
488 | #if ENABLE_TRANSPARENCY |
584 | Color_tint, |
489 | Color_tint, |
585 | #endif |
490 | #endif |
586 | #if OFF_FOCUS_FADING |
491 | #if OFF_FOCUS_FADING |
587 | Color_fade, |
492 | Color_fade, |
588 | #endif |
493 | #endif |
589 | NRS_COLORS, /* */ |
494 | NRS_COLORS, /* */ |
590 | #ifdef KEEP_SCROLLCOLOR |
495 | #ifdef RXVT_SCROLLBAR |
591 | Color_topShadow = NRS_COLORS, |
496 | Color_topShadow = NRS_COLORS, |
592 | Color_bottomShadow, |
497 | Color_bottomShadow, |
593 | TOTAL_COLORS |
498 | TOTAL_COLORS |
594 | #else |
499 | #else |
595 | TOTAL_COLORS = NRS_COLORS |
500 | TOTAL_COLORS = NRS_COLORS |
… | |
… | |
631 | #define PrivMode_smoothScroll (1UL<<17) |
536 | #define PrivMode_smoothScroll (1UL<<17) |
632 | #define PrivMode_vt52 (1UL<<18) |
537 | #define PrivMode_vt52 (1UL<<18) |
633 | #define PrivMode_LFNL (1UL<<19) |
538 | #define PrivMode_LFNL (1UL<<19) |
634 | #define PrivMode_MouseBtnEvent (1UL<<20) |
539 | #define PrivMode_MouseBtnEvent (1UL<<20) |
635 | #define PrivMode_MouseAnyEvent (1UL<<21) |
540 | #define PrivMode_MouseAnyEvent (1UL<<21) |
|
|
541 | #define PrivMode_BracketPaste (1UL<<22) |
636 | |
542 | |
637 | #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) |
638 | |
544 | |
639 | #ifdef ALLOW_132_MODE |
545 | #ifdef ALLOW_132_MODE |
640 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
546 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
… | |
… | |
737 | #if ENABLE_STYLES |
643 | #if ENABLE_STYLES |
738 | # define FONTSET(style) fontset[GET_STYLE (style)] |
644 | # define FONTSET(style) fontset[GET_STYLE (style)] |
739 | #else |
645 | #else |
740 | # define FONTSET(style) fontset[0] |
646 | # define FONTSET(style) fontset[0] |
741 | #endif |
647 | #endif |
742 | |
|
|
743 | #ifdef HAVE_SCROLLBARS |
|
|
744 | # define scrollbar_TotalWidth() (scrollBar.width + sb_shadow * 2) |
|
|
745 | #else |
|
|
746 | # define scrollbar_TotalWidth() (0) |
|
|
747 | #endif |
|
|
748 | #define scrollbar_isMotion() (scrollBar.state == 'm') |
|
|
749 | #define scrollbar_isUp() (scrollBar.state == 'U') |
|
|
750 | #define scrollbar_isDn() (scrollBar.state == 'D') |
|
|
751 | #define scrollbar_isUpDn() isupper (scrollBar.state) |
|
|
752 | #define isScrollbarWindow(w) (scrollBar.state && (w) == scrollBar.win) |
|
|
753 | |
|
|
754 | #define scrollbarnext_dnval() (scrollBar.end + (scrollBar.width + 1)) |
|
|
755 | #define scrollbarnext_upButton(y) ((y) > scrollBar.end \ |
|
|
756 | && (y) <= scrollbarnext_dnval ()) |
|
|
757 | #define scrollbarnext_dnButton(y) ((y) > scrollbarnext_dnval()) |
|
|
758 | #define SCROLLNEXT_MINHEIGHT SB_THUMB_MIN_HEIGHT |
|
|
759 | #define scrollbarrxvt_upButton(y) ((y) < scrollBar.beg) |
|
|
760 | #define scrollbarrxvt_dnButton(y) ((y) > scrollBar.end) |
|
|
761 | #define SCROLLRXVT_MINHEIGHT 10 |
|
|
762 | #define SCROLLXTERM_MINHEIGHT 10 |
|
|
763 | |
|
|
764 | #define scrollbar_minheight() (scrollBar.style == R_SB_NEXT \ |
|
|
765 | ? SCROLLNEXT_MINHEIGHT \ |
|
|
766 | : SCROLLRXVT_MINHEIGHT) |
|
|
767 | #define scrollbar_above_slider(y) ((y) < scrollBar.top) |
|
|
768 | #define scrollbar_below_slider(y) ((y) > scrollBar.bot) |
|
|
769 | #define scrollbar_position(y) ((y) - scrollBar.beg) |
|
|
770 | #define scrollbar_size() (scrollBar.end - scrollBar.beg \ |
|
|
771 | - scrollbar_minheight ()) |
|
|
772 | |
648 | |
773 | typedef callback<void (const char *)> log_callback; |
649 | typedef callback<void (const char *)> log_callback; |
774 | typedef callback<int (int)> getfd_callback; |
650 | typedef callback<int (int)> getfd_callback; |
775 | |
651 | |
776 | /****************************************************************************/ |
652 | /****************************************************************************/ |
… | |
… | |
1029 | Opt_count |
905 | Opt_count |
1030 | }; |
906 | }; |
1031 | |
907 | |
1032 | /* ------------------------------------------------------------------------- */ |
908 | /* ------------------------------------------------------------------------- */ |
1033 | |
909 | |
1034 | typedef struct { |
|
|
1035 | char state; /* scrollbar state */ |
|
|
1036 | char init; /* scrollbar has been initialised */ |
|
|
1037 | unsigned int beg; /* slider sub-window begin height */ |
|
|
1038 | unsigned int end; /* slider sub-window end height */ |
|
|
1039 | unsigned int top; /* slider top position */ |
|
|
1040 | unsigned int bot; /* slider bottom position */ |
|
|
1041 | unsigned int style; /* style: rxvt, xterm, next */ |
|
|
1042 | unsigned int width; /* scrollbar width */ |
|
|
1043 | Window win; |
|
|
1044 | int (rxvt_term::*update)(int, int, int, int); |
|
|
1045 | |
|
|
1046 | void setIdle() { state = 1 ; } |
|
|
1047 | void setMotion() { state = 'm'; } |
|
|
1048 | void setUp() { state = 'U'; } |
|
|
1049 | void setDn() { state = 'D'; } |
|
|
1050 | } scrollBar_t; |
|
|
1051 | |
|
|
1052 | struct rxvt_vars : TermWin_t { |
910 | struct rxvt_vars : TermWin_t { |
1053 | scrollBar_t scrollBar; |
911 | scrollBar_t scrollBar; |
1054 | uint8_t options[(Opt_count + 7) >> 3]; |
912 | uint8_t options[(Opt_count + 7) >> 3]; |
1055 | XSizeHints szHint; |
913 | XSizeHints szHint; |
1056 | rxvt_color *pix_colors; |
914 | rxvt_color *pix_colors; |
1057 | Cursor TermWin_cursor; /* cursor for vt window */ |
915 | Cursor TermWin_cursor; /* cursor for vt window */ |
1058 | int sb_shadow; /* scrollbar shadow width */ |
|
|
1059 | int numlock_state; |
916 | int numlock_state; |
1060 | line_t *row_buf; // all lines, scrollback + terminal, circular, followed by temp_buf |
917 | line_t *row_buf; // all lines, scrollback + terminal, circular, followed by temp_buf |
1061 | line_t *drawn_buf; // text on screen |
918 | line_t *drawn_buf; // text on screen |
1062 | line_t *swap_buf; // lines for swap buffer |
919 | line_t *swap_buf; // lines for swap buffer |
1063 | char *tabs; /* per location: 1 == tab-stop */ |
920 | char *tabs; /* per location: 1 == tab-stop */ |
… | |
… | |
1104 | |
961 | |
1105 | unsigned char refresh_type, |
962 | unsigned char refresh_type, |
1106 | #ifdef META8_OPTION |
963 | #ifdef META8_OPTION |
1107 | meta_char, /* Alt-key prefix */ |
964 | meta_char, /* Alt-key prefix */ |
1108 | #endif |
965 | #endif |
1109 | scrollbar_align, |
|
|
1110 | selection_wait, |
966 | selection_wait, |
1111 | selection_type; |
967 | selection_type; |
1112 | /* ---------- */ |
968 | /* ---------- */ |
1113 | bool rvideo_state, rvideo_mode; |
969 | bool rvideo_state, rvideo_mode; |
1114 | #ifndef NO_BELL |
970 | #ifndef NO_BELL |
… | |
… | |
1132 | /* give proper Scroll behaviour */ |
988 | /* give proper Scroll behaviour */ |
1133 | #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) |
989 | #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) |
1134 | mouse_slip_wheel_speed, |
990 | mouse_slip_wheel_speed, |
1135 | #endif |
991 | #endif |
1136 | refresh_count, |
992 | refresh_count, |
1137 | last_bot, /* scrollbar last bottom position */ |
|
|
1138 | last_top, /* scrollbar last top position */ |
|
|
1139 | last_state, /* scrollbar last state */ |
|
|
1140 | scrollbar_len, |
|
|
1141 | window_vt_x, |
993 | window_vt_x, |
1142 | window_vt_y, |
994 | window_vt_y, |
1143 | window_sb_x, |
|
|
1144 | mouse_row, |
995 | mouse_row, |
1145 | mouse_col, |
996 | mouse_col, |
1146 | # ifdef POINTER_BLANK |
997 | # ifdef POINTER_BLANK |
1147 | pointerBlankDelay, |
998 | pointerBlankDelay, |
1148 | # endif |
999 | # endif |
… | |
… | |
1187 | selection_request_time; |
1038 | selection_request_time; |
1188 | pid_t cmd_pid; /* process id of child */ |
1039 | pid_t cmd_pid; /* process id of child */ |
1189 | char * incr_buf; |
1040 | char * incr_buf; |
1190 | size_t incr_buf_size, incr_buf_fill; |
1041 | size_t incr_buf_size, incr_buf_fill; |
1191 | /* ---------- */ |
1042 | /* ---------- */ |
1192 | Cursor leftptr_cursor; |
|
|
1193 | /* ---------- */ |
|
|
1194 | struct mouse_event MEvent; |
1043 | struct mouse_event MEvent; |
1195 | XComposeStatus compose; |
1044 | XComposeStatus compose; |
1196 | ttymode_t tio; |
1045 | struct termios tio; |
1197 | row_col_t oldcursor; |
1046 | row_col_t oldcursor; |
1198 | #ifdef HAVE_BG_PIXMAP |
1047 | #ifdef HAVE_BG_PIXMAP |
1199 | bgPixmap_t bgPixmap; |
1048 | bgPixmap_t bgPixmap; |
1200 | #endif |
1049 | #endif |
1201 | #ifdef HAVE_AFTERIMAGE |
1050 | #ifdef HAVE_AFTERIMAGE |
… | |
… | |
1252 | |
1101 | |
1253 | #if ENABLE_FRILLS || ISO_14755 |
1102 | #if ENABLE_FRILLS || ISO_14755 |
1254 | // ISO 14755 entry support |
1103 | // ISO 14755 entry support |
1255 | unicode_t iso14755buf; |
1104 | unicode_t iso14755buf; |
1256 | void commit_iso14755 (); |
1105 | void commit_iso14755 (); |
1257 | int hex_keyval (XKeyEvent &ev); |
|
|
1258 | # if ISO_14755 |
1106 | # if ISO_14755 |
1259 | 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); |
1260 | void iso14755_54 (int x, int y); |
1108 | void iso14755_54 (int x, int y); |
1261 | # endif |
1109 | # endif |
1262 | #endif |
1110 | #endif |
… | |
… | |
1283 | #endif |
1131 | #endif |
1284 | |
1132 | |
1285 | void x_cb (XEvent &xev); |
1133 | void x_cb (XEvent &xev); |
1286 | xevent_watcher termwin_ev; |
1134 | xevent_watcher termwin_ev; |
1287 | xevent_watcher vt_ev; |
1135 | xevent_watcher vt_ev; |
1288 | #ifdef HAVE_SCROLLBARS |
|
|
1289 | xevent_watcher scrollbar_ev; |
1136 | xevent_watcher scrollbar_ev; |
1290 | #endif |
|
|
1291 | |
1137 | |
1292 | 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; |
1293 | 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; |
1294 | void refresh_check (); |
1140 | void refresh_check (); |
1295 | void flush (); |
1141 | void flush (); |
… | |
… | |
1396 | 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); |
1397 | void process_sgr_mode (unsigned int nargs, const int *arg); |
1243 | void process_sgr_mode (unsigned int nargs, const int *arg); |
1398 | void process_graphics (); |
1244 | void process_graphics (); |
1399 | // init.C |
1245 | // init.C |
1400 | void init_vars (); |
1246 | void init_vars (); |
1401 | void init_secondary (); |
|
|
1402 | 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); |
1403 | void init_env (); |
1249 | void init_env (); |
1404 | void set_locale (const char *locale); |
1250 | void set_locale (const char *locale); |
1405 | void init_xlocale (); |
1251 | void init_xlocale (); |
1406 | void init_command (const char *const *argv); |
1252 | void init_command (const char *const *argv); |
1407 | void run_command (const char *const *argv); |
1253 | void run_command (const char *const *argv); |
… | |
… | |
1414 | void tt_winch (); |
1260 | void tt_winch (); |
1415 | rxvt_term (); |
1261 | rxvt_term (); |
1416 | ~rxvt_term (); |
1262 | ~rxvt_term (); |
1417 | void destroy (); |
1263 | void destroy (); |
1418 | void emergency_cleanup (); |
1264 | void emergency_cleanup (); |
1419 | void init (int argc, const char *const *argv, stringvec *envv); |
|
|
1420 | void recolour_cursor (); |
1265 | void recolour_cursor (); |
1421 | 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); |
1422 | void window_calc (unsigned int newwidth, unsigned int newheight); |
1267 | void window_calc (unsigned int newwidth, unsigned int newheight); |
1423 | bool set_fonts (); |
1268 | bool set_fonts (); |
1424 | 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); |
… | |
… | |
1510 | options[opt >> 3] |= (1 << (opt & 7)); |
1355 | options[opt >> 3] |= (1 << (opt & 7)); |
1511 | else |
1356 | else |
1512 | options[opt >> 3] &= ~(1 << (opt & 7)); |
1357 | options[opt >> 3] &= ~(1 << (opt & 7)); |
1513 | } |
1358 | } |
1514 | |
1359 | |
1515 | void PrivMode (int set, unsigned bit) NOTHROW |
1360 | void set_privmode (unsigned bit, int set) NOTHROW |
1516 | { |
1361 | { |
1517 | if (set) |
1362 | if (set) |
1518 | priv_modes |= bit; |
1363 | priv_modes |= bit; |
1519 | else |
1364 | else |
1520 | priv_modes &= ~bit; |
1365 | priv_modes &= ~bit; |
… | |
… | |
1623 | |
1468 | |
1624 | // scrollbar.C |
1469 | // scrollbar.C |
1625 | void resize_scrollbar (); |
1470 | void resize_scrollbar (); |
1626 | int scrollbar_mapping (int map); |
1471 | int scrollbar_mapping (int map); |
1627 | int scrollbar_show (int update); |
1472 | int scrollbar_show (int update); |
1628 | void setup_scrollbar (const char *scrollalign, const char *scrollstyle, const char *thickness); |
|
|
1629 | |
1473 | |
1630 | // xdefaults.C |
1474 | // xdefaults.C |
1631 | void get_options (int argc, const char *const *argv); |
1475 | void get_options (int argc, const char *const *argv); |
1632 | int parse_keysym (const char *str, const char *arg); |
1476 | int parse_keysym (const char *str, const char *arg); |
1633 | const char *x_resource (const char *name); |
1477 | const char *x_resource (const char *name); |