… | |
… | |
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 |
78 | #ifdef XPM_BACKGROUND |
82 | #elif defined(XPM_BACKGROUND) |
79 | # ifdef XPM_INC_X11 |
83 | # ifdef XPM_INC_X11 |
80 | # include <X11/xpm.h> |
84 | # include <X11/xpm.h> |
81 | # else |
85 | # else |
82 | # include <xpm.h> |
86 | # include <xpm.h> |
83 | # endif |
87 | # endif |
… | |
… | |
177 | #endif |
181 | #endif |
178 | |
182 | |
179 | #ifdef XPM_BACKGROUND |
183 | #ifdef XPM_BACKGROUND |
180 | typedef struct { |
184 | typedef struct { |
181 | short w, h, x, y; |
185 | short w, h, x, y; |
|
|
186 | bool auto_resize ; |
182 | Pixmap pixmap; |
187 | Pixmap pixmap; |
183 | } bgPixmap_t; |
188 | } bgPixmap_t; |
184 | #endif |
189 | #endif |
185 | |
190 | |
186 | /* |
191 | /* |
… | |
… | |
894 | rxvt_perl_term perl; |
899 | rxvt_perl_term perl; |
895 | #endif |
900 | #endif |
896 | struct mbstate mbstate; // current input multibyte state |
901 | struct mbstate mbstate; // current input multibyte state |
897 | |
902 | |
898 | unsigned char want_refresh:1, |
903 | unsigned char want_refresh:1, |
899 | #ifdef TRANSPARENT |
904 | #ifdef ENABLE_TRANSPARENCY |
900 | want_full_refresh:1, /* awaiting full screen refresh */ |
905 | want_full_refresh:1, /* awaiting full screen refresh */ |
901 | am_transparent:1, /* is a transparent term */ |
906 | am_transparent:1, /* is a transparent term */ |
902 | am_pixmap_trans:1, /* transparency w/known root pixmap */ |
907 | am_pixmap_trans:1, /* transparency w/known root pixmap */ |
903 | #endif |
908 | #endif |
904 | current_screen:1, /* primary or secondary */ |
909 | current_screen:1, /* primary or secondary */ |
… | |
… | |
948 | /* give proper Scroll behaviour */ |
953 | /* give proper Scroll behaviour */ |
949 | #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) |
954 | #if defined(MOUSE_WHEEL) && defined(MOUSE_SLIP_WHEELING) |
950 | mouse_slip_wheel_speed, |
955 | mouse_slip_wheel_speed, |
951 | #endif |
956 | #endif |
952 | refresh_count, |
957 | refresh_count, |
953 | refresh_limit, |
|
|
954 | last_bot, /* scrollbar last bottom position */ |
958 | last_bot, /* scrollbar last bottom position */ |
955 | last_top, /* scrollbar last top position */ |
959 | last_top, /* scrollbar last top position */ |
956 | last_state, /* scrollbar last state */ |
960 | last_state, /* scrollbar last state */ |
957 | scrollbar_len, |
961 | scrollbar_len, |
958 | window_vt_x, |
962 | window_vt_x, |
… | |
… | |
1016 | XComposeStatus compose; |
1020 | XComposeStatus compose; |
1017 | ttymode_t tio; |
1021 | ttymode_t tio; |
1018 | row_col_t oldcursor; |
1022 | row_col_t oldcursor; |
1019 | #ifdef XPM_BACKGROUND |
1023 | #ifdef XPM_BACKGROUND |
1020 | bgPixmap_t bgPixmap; |
1024 | bgPixmap_t bgPixmap; |
|
|
1025 | #ifdef HAVE_AFTERIMAGE |
|
|
1026 | ASImageManager *asimman; |
|
|
1027 | ASImage *original_asim; |
|
|
1028 | struct { unsigned int width, height; } xpmAttr; /* all we need is width/height */ |
|
|
1029 | #else |
1021 | XpmAttributes xpmAttr; /* originally loaded pixmap and its scaling */ |
1030 | XpmAttributes xpmAttr; /* originally loaded pixmap and its scaling */ |
|
|
1031 | #endif |
1022 | #endif |
1032 | #endif |
1023 | |
1033 | |
1024 | #if ENABLE_OVERLAY |
1034 | #if ENABLE_OVERLAY |
1025 | int ov_x, ov_y, ov_w, ov_h; // overlay dimensions |
1035 | int ov_x, ov_y, ov_w, ov_h; // overlay dimensions |
1026 | text_t **ov_text; |
1036 | text_t **ov_text; |
… | |
… | |
1084 | void vt_select_input () const NOTHROW |
1094 | void vt_select_input () const NOTHROW |
1085 | { |
1095 | { |
1086 | XSelectInput (dpy, vt, vt_emask | vt_emask_perl | vt_emask_xim); |
1096 | XSelectInput (dpy, vt, vt_emask | vt_emask_perl | vt_emask_xim); |
1087 | } |
1097 | } |
1088 | |
1098 | |
1089 | #if TRANSPARENT || ENABLE_PERL |
1099 | #if ENABLE_TRANSPARENCY || ENABLE_PERL |
1090 | void rootwin_cb (XEvent &xev); |
1100 | void rootwin_cb (XEvent &xev); |
1091 | xevent_watcher rootwin_ev; |
1101 | xevent_watcher rootwin_ev; |
|
|
1102 | #endif |
|
|
1103 | #if ENABLE_TRANSPARENCY |
|
|
1104 | int check_our_parents (); |
|
|
1105 | void check_our_parents_cb (time_watcher &w); |
|
|
1106 | time_watcher check_our_parents_ev; |
1092 | #endif |
1107 | #endif |
1093 | |
1108 | |
1094 | void x_cb (XEvent &xev); |
1109 | void x_cb (XEvent &xev); |
1095 | void flush (); |
1110 | void flush (); |
1096 | xevent_watcher termwin_ev; |
1111 | xevent_watcher termwin_ev; |
… | |
… | |
1214 | void button_press (XButtonEvent &ev); |
1229 | void button_press (XButtonEvent &ev); |
1215 | void button_release (XButtonEvent &ev); |
1230 | void button_release (XButtonEvent &ev); |
1216 | void focus_in (); |
1231 | void focus_in (); |
1217 | void focus_out (); |
1232 | void focus_out (); |
1218 | void update_fade_color (unsigned int idx); |
1233 | void update_fade_color (unsigned int idx); |
1219 | int check_our_parents (); |
|
|
1220 | #ifdef PRINTPIPE |
1234 | #ifdef PRINTPIPE |
1221 | FILE *popen_printer (); |
1235 | FILE *popen_printer (); |
1222 | int pclose_printer (FILE *stream); |
1236 | int pclose_printer (FILE *stream); |
1223 | #endif |
1237 | #endif |
1224 | void process_print_pipe (); |
1238 | void process_print_pipe (); |