… | |
… | |
73 | #endif |
73 | #endif |
74 | |
74 | |
75 | #include <termios.h> |
75 | #include <termios.h> |
76 | typedef struct termios ttymode_t; |
76 | typedef struct termios ttymode_t; |
77 | |
77 | |
78 | #ifdef HAVE_AFTERIMAGE |
|
|
79 | # include <afterimage.h> |
|
|
80 | #undef min |
|
|
81 | #undef max |
|
|
82 | #endif |
|
|
83 | |
|
|
84 | #include "background.h" |
78 | #include "background.h" |
85 | |
79 | |
86 | #ifndef STDIN_FILENO |
80 | #ifndef STDIN_FILENO |
87 | # define STDIN_FILENO 0 |
81 | # define STDIN_FILENO 0 |
88 | # define STDOUT_FILENO 1 |
82 | # define STDOUT_FILENO 1 |
… | |
… | |
110 | // misc.C |
104 | // misc.C |
111 | char * rxvt_wcstombs (const wchar_t *str, int len = -1); |
105 | char * rxvt_wcstombs (const wchar_t *str, int len = -1); |
112 | wchar_t * rxvt_mbstowcs (const char *str, int len = -1); |
106 | wchar_t * rxvt_mbstowcs (const char *str, int len = -1); |
113 | char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); |
107 | char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); |
114 | wchar_t * rxvt_utf8towcs (const char *str, int len = -1); |
108 | wchar_t * rxvt_utf8towcs (const char *str, int len = -1); |
115 | |
|
|
116 | #define rxvt_strdup(s) ((s) ? strdup(s) : 0) |
|
|
117 | |
109 | |
118 | char * rxvt_basename (const char *str) NOTHROW; |
110 | char * rxvt_basename (const char *str) NOTHROW; |
119 | void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; |
111 | void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; |
120 | void rxvt_log (const char *fmt,...) NOTHROW; |
112 | void rxvt_log (const char *fmt,...) NOTHROW; |
121 | void rxvt_warn (const char *fmt,...) NOTHROW; |
113 | void rxvt_warn (const char *fmt,...) NOTHROW; |
… | |
… | |
598 | #define PrivMode_TtyOutputInh (1UL<<15) |
590 | #define PrivMode_TtyOutputInh (1UL<<15) |
599 | #define PrivMode_Keypress (1UL<<16) |
591 | #define PrivMode_Keypress (1UL<<16) |
600 | #define PrivMode_smoothScroll (1UL<<17) |
592 | #define PrivMode_smoothScroll (1UL<<17) |
601 | #define PrivMode_vt52 (1UL<<18) |
593 | #define PrivMode_vt52 (1UL<<18) |
602 | #define PrivMode_LFNL (1UL<<19) |
594 | #define PrivMode_LFNL (1UL<<19) |
|
|
595 | #define PrivMode_MouseBtnEvent (1UL<<20) |
|
|
596 | #define PrivMode_MouseAnyEvent (1UL<<21) |
603 | /* too annoying to implement X11 highlight tracking */ |
597 | /* too annoying to implement X11 highlight tracking */ |
604 | /* #define PrivMode_MouseX11Track (1LU<<20) */ |
598 | /* #define PrivMode_MouseX11Track (1LU<<20) */ |
605 | |
599 | |
606 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) |
600 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11|PrivMode_MouseBtnEvent|PrivMode_MouseAnyEvent) |
607 | |
601 | |
608 | #ifdef ALLOW_132_MODE |
602 | #ifdef ALLOW_132_MODE |
609 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
603 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
610 | #else |
604 | #else |
611 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor) |
605 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor) |
… | |
… | |
924 | last_state, /* scrollbar last state */ |
918 | last_state, /* scrollbar last state */ |
925 | scrollbar_len, |
919 | scrollbar_len, |
926 | window_vt_x, |
920 | window_vt_x, |
927 | window_vt_y, |
921 | window_vt_y, |
928 | window_sb_x, |
922 | window_sb_x, |
|
|
923 | mouse_row, |
|
|
924 | mouse_col, |
929 | # ifdef POINTER_BLANK |
925 | # ifdef POINTER_BLANK |
930 | pointerBlankDelay, |
926 | pointerBlankDelay, |
931 | # endif |
927 | # endif |
932 | allowedxerror; |
928 | allowedxerror; |
933 | /* ---------- */ |
929 | /* ---------- */ |
… | |
… | |
1039 | void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE, int x = 0, int y = -1); |
1035 | void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE, int x = 0, int y = -1); |
1040 | void iso14755_54 (int x, int y); |
1036 | void iso14755_54 (int x, int y); |
1041 | # endif |
1037 | # endif |
1042 | #endif |
1038 | #endif |
1043 | |
1039 | |
1044 | long vt_emask, vt_emask_perl, vt_emask_xim; |
1040 | long vt_emask, vt_emask_perl, vt_emask_xim, vt_emask_mouse; |
1045 | |
1041 | |
1046 | void vt_select_input () const NOTHROW |
1042 | void vt_select_input () const NOTHROW |
1047 | { |
1043 | { |
1048 | XSelectInput (dpy, vt, vt_emask | vt_emask_perl | vt_emask_xim); |
1044 | XSelectInput (dpy, vt, vt_emask | vt_emask_perl | vt_emask_xim | vt_emask_mouse); |
1049 | } |
1045 | } |
1050 | |
1046 | |
1051 | #if ENABLE_TRANSPARENCY || ENABLE_PERL |
1047 | #if ENABLE_TRANSPARENCY || ENABLE_PERL |
1052 | void rootwin_cb (XEvent &xev); |
1048 | void rootwin_cb (XEvent &xev); |
1053 | xevent_watcher rootwin_ev; |
1049 | xevent_watcher rootwin_ev; |
… | |
… | |
1364 | void selection_send (const XSelectionRequestEvent &rq) NOTHROW; |
1360 | void selection_send (const XSelectionRequestEvent &rq) NOTHROW; |
1365 | void selection_click (int clicks, int x, int y) NOTHROW; |
1361 | void selection_click (int clicks, int x, int y) NOTHROW; |
1366 | void selection_extend (int x, int y, int flag) NOTHROW; |
1362 | void selection_extend (int x, int y, int flag) NOTHROW; |
1367 | void selection_rotate (int x, int y) NOTHROW; |
1363 | void selection_rotate (int x, int y) NOTHROW; |
1368 | |
1364 | |
1369 | void pixel_position (int *x, int *y) NOTHROW; |
|
|
1370 | |
|
|
1371 | #if defined(NEXT_SCROLLBAR) |
1365 | #if defined(NEXT_SCROLLBAR) |
1372 | // scrollbar-next.C |
1366 | // scrollbar-next.C |
1373 | Pixmap renderPixmap (const char *const *data, int width, int height); |
1367 | Pixmap renderPixmap (const char *const *data, int width, int height); |
1374 | void init_scrollbar_stuff (); |
1368 | void init_scrollbar_stuff (); |
1375 | void drawBevel (Drawable d, int x1, int y1, int w, int h); |
1369 | void drawBevel (Drawable d, int x1, int y1, int w, int h); |