… | |
… | |
99 | ***************************************************************************** |
99 | ***************************************************************************** |
100 | * PROTOTYPES |
100 | * PROTOTYPES |
101 | ***************************************************************************** |
101 | ***************************************************************************** |
102 | */ |
102 | */ |
103 | // main.C |
103 | // main.C |
104 | RETSIGTYPE rxvt_Child_signal (int sig) NOTHROW; |
|
|
105 | RETSIGTYPE rxvt_Exit_signal (int sig) NOTHROW; |
|
|
106 | void rxvt_clean_exit () NOTHROW; |
|
|
107 | void * rxvt_malloc (size_t size); |
104 | void * rxvt_malloc (size_t size); |
108 | void * rxvt_calloc (size_t number, size_t size); |
105 | void * rxvt_calloc (size_t number, size_t size); |
109 | void * rxvt_realloc (void *ptr, size_t size); |
106 | void * rxvt_realloc (void *ptr, size_t size); |
110 | |
107 | |
111 | // misc.C |
108 | // misc.C |
… | |
… | |
114 | char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); |
111 | char * rxvt_wcstoutf8 (const wchar_t *str, int len = -1); |
115 | wchar_t * rxvt_utf8towcs (const char *str, int len = -1); |
112 | wchar_t * rxvt_utf8towcs (const char *str, int len = -1); |
116 | |
113 | |
117 | #define rxvt_strdup(s) ((s) ? strdup(s) : 0) |
114 | #define rxvt_strdup(s) ((s) ? strdup(s) : 0) |
118 | |
115 | |
119 | char * rxvt_r_basename (const char *str) NOTHROW; |
116 | char * rxvt_basename (const char *str) NOTHROW; |
120 | void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; |
117 | void rxvt_vlog (const char *fmt, va_list arg_ptr) NOTHROW; |
121 | void rxvt_log (const char *fmt,...) NOTHROW; |
118 | void rxvt_log (const char *fmt,...) NOTHROW; |
122 | void rxvt_warn (const char *fmt,...) NOTHROW; |
119 | void rxvt_warn (const char *fmt,...) NOTHROW; |
123 | void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) NORETURN; |
120 | void rxvt_fatal (const char *fmt, ...) THROW ((class rxvt_failure_exception)) NORETURN; |
124 | void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; |
121 | void rxvt_exit_failure () THROW ((class rxvt_failure_exception)) NORETURN; |
125 | |
122 | |
126 | int rxvt_Str_match (const char *s1, const char *s2) NOTHROW; |
|
|
127 | const char * rxvt_Str_skip_space (const char *str) NOTHROW; |
|
|
128 | char * rxvt_Str_trim (char *str) NOTHROW; |
123 | char * rxvt_strtrim (char *str) NOTHROW; |
129 | int rxvt_Str_escaped (char *str) NOTHROW; |
|
|
130 | char ** rxvt_splitcommastring (const char *cs) NOTHROW; |
124 | char ** rxvt_splitcommastring (const char *cs) NOTHROW; |
131 | void rxvt_freecommastring (char **cs) NOTHROW; |
125 | void rxvt_freecommastring (char **cs) NOTHROW; |
132 | |
126 | |
133 | ///////////////////////////////////////////////////////////////////////////// |
127 | ///////////////////////////////////////////////////////////////////////////// |
134 | |
128 | |
135 | // temporarily replace the process environment |
129 | // temporarily replace the process environment |
136 | extern char **environ; |
130 | extern char **environ; |
137 | extern char **rxvt_environ; // the original environ pointer |
131 | extern char **rxvt_environ; // the original environ pointer |
138 | |
132 | |
139 | inline void set_environ (stringvec *envv) |
133 | static inline void set_environ (stringvec *envv) |
140 | { |
134 | { |
141 | #if ENABLE_PERL |
135 | #if ENABLE_PERL |
142 | assert (envv); |
136 | assert (envv); |
143 | #else |
137 | #else |
144 | if (envv) |
138 | if (envv) |
145 | #endif |
139 | #endif |
146 | environ = (char **)envv->begin (); |
140 | environ = (char **)envv->begin (); |
147 | } |
141 | } |
148 | |
142 | |
149 | inline void set_environ (char **envv) |
143 | static inline void set_environ (char **envv) |
150 | { |
144 | { |
151 | #if ENABLE_PERL |
145 | #if ENABLE_PERL |
152 | assert (envv); |
146 | assert (envv); |
153 | #else |
147 | #else |
154 | if (envv) |
148 | if (envv) |
… | |
… | |
181 | propScale = (1UL<<1), |
175 | propScale = (1UL<<1), |
182 | geometryFlags = (geometrySet|propScale), |
176 | geometryFlags = (geometrySet|propScale), |
183 | |
177 | |
184 | tintSet = (1UL<<8), |
178 | tintSet = (1UL<<8), |
185 | tintNeeded = (1UL<<9), |
179 | tintNeeded = (1UL<<9), |
|
|
180 | tintWholesome = (1UL<<10), |
186 | tintServerSide = (1UL<<10), |
181 | tintServerSide = (1UL<<11), |
187 | tintFlags = (tintSet|tintServerSide|tintNeeded), |
182 | tintFlags = (tintSet|tintServerSide|tintNeeded|tintWholesome), |
188 | blurNeeded = (1UL<<11), |
183 | blurNeeded = (1UL<<12), |
189 | |
184 | |
190 | isTransparent = (1UL<<16), |
185 | isTransparent = (1UL<<16), |
191 | isInvalid = (1UL<<17) |
186 | isInvalid = (1UL<<17) |
192 | }; |
187 | }; |
193 | |
188 | |
194 | unsigned long flags; |
189 | unsigned long flags; |
|
|
190 | |
|
|
191 | enum { |
|
|
192 | transpPmapTiled = (1UL<<0), |
|
|
193 | transpPmapTinted = tintNeeded, |
|
|
194 | transpPmapBlured = blurNeeded, |
|
|
195 | transpTransformations = (tintNeeded|blurNeeded) |
|
|
196 | }; /* this flags are returned by make_transparency_pixmap if called */ |
195 | |
197 | |
196 | # ifdef XPM_BACKGROUND |
198 | # ifdef XPM_BACKGROUND |
197 | # ifdef HAVE_AFTERIMAGE |
199 | # ifdef HAVE_AFTERIMAGE |
198 | ASImage *original_asim; |
200 | ASImage *original_asim; |
199 | bool render_asim (ASImage *background, ARGB32 background_tint); |
201 | bool render_asim (ASImage *background, ARGB32 background_tint); |
… | |
… | |
230 | bool set_blur_radius (const char *geom); |
232 | bool set_blur_radius (const char *geom); |
231 | bool set_tint (rxvt_color &new_tint); |
233 | bool set_tint (rxvt_color &new_tint); |
232 | bool unset_tint (); |
234 | bool unset_tint (); |
233 | bool set_shade (const char *shade_str); |
235 | bool set_shade (const char *shade_str); |
234 | bool set_root_pixmap (); |
236 | bool set_root_pixmap (); |
235 | |
237 | |
236 | enum { |
|
|
237 | transpPmapTiled = (1UL<<0), |
|
|
238 | transpPmapTinted = tintNeeded, |
|
|
239 | transpPmapBlured = blurNeeded, |
|
|
240 | transpTransformations = (tintNeeded|blurNeeded) |
|
|
241 | }; |
|
|
242 | unsigned long make_transparency_pixmap ();/* returns combination of the above flags */ |
238 | unsigned long make_transparency_pixmap ();/* returns combination of the transpTransformations flags */ |
243 | # endif |
239 | # endif |
244 | double invalid_since; |
240 | double invalid_since; |
245 | |
241 | |
246 | Pixmap pixmap; |
242 | Pixmap pixmap; |
247 | unsigned int pmap_width, pmap_height; |
243 | unsigned int pmap_width, pmap_height; |
… | |
… | |
697 | #define PrivMode_LFNL (1UL<<19) |
693 | #define PrivMode_LFNL (1UL<<19) |
698 | /* too annoying to implement X11 highlight tracking */ |
694 | /* too annoying to implement X11 highlight tracking */ |
699 | /* #define PrivMode_MouseX11Track (1LU<<20) */ |
695 | /* #define PrivMode_MouseX11Track (1LU<<20) */ |
700 | |
696 | |
701 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) |
697 | #define PrivMode_mouse_report (PrivMode_MouseX10|PrivMode_MouseX11) |
702 | #define PrivMode(test,bit) \ |
|
|
703 | if (test) \ |
|
|
704 | priv_modes |= (bit); \ |
|
|
705 | else \ |
|
|
706 | priv_modes &= ~(bit) |
|
|
707 | |
698 | |
708 | #ifdef ALLOW_132_MODE |
699 | #ifdef ALLOW_132_MODE |
709 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
700 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor|PrivMode_132OK) |
710 | #else |
701 | #else |
711 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor) |
702 | # define PrivMode_Default (PrivMode_Autowrap|PrivMode_ShiftKeys|PrivMode_VisibleCursor) |
… | |
… | |
970 | struct mbstate mbstate; // current input multibyte state |
961 | struct mbstate mbstate; // current input multibyte state |
971 | |
962 | |
972 | unsigned char want_refresh:1, |
963 | unsigned char want_refresh:1, |
973 | #ifdef ENABLE_TRANSPARENCY |
964 | #ifdef ENABLE_TRANSPARENCY |
974 | want_full_refresh:1, /* awaiting full screen refresh */ |
965 | want_full_refresh:1, /* awaiting full screen refresh */ |
975 | am_transparent:1, /* is a transparent term */ |
|
|
976 | am_pixmap_trans:1, /* transparency w/known root pixmap */ |
|
|
977 | #endif |
966 | #endif |
978 | current_screen:1, /* primary or secondary */ |
967 | current_screen:1, /* primary or secondary */ |
979 | num_scr_allow:1, |
968 | num_scr_allow:1, |
980 | bypass_keystate:1, |
969 | bypass_keystate:1, |
981 | #ifdef CURSOR_BLINK |
970 | #ifdef CURSOR_BLINK |
… | |
… | |
1077 | char * incr_buf; |
1066 | char * incr_buf; |
1078 | size_t incr_buf_size, incr_buf_fill; |
1067 | size_t incr_buf_size, incr_buf_fill; |
1079 | /* ---------- */ |
1068 | /* ---------- */ |
1080 | Cursor leftptr_cursor; |
1069 | Cursor leftptr_cursor; |
1081 | /* ---------- */ |
1070 | /* ---------- */ |
1082 | #ifndef NO_BACKSPACE_KEY |
|
|
1083 | const char *key_backspace; |
|
|
1084 | #endif |
|
|
1085 | #ifndef NO_DELETE_KEY |
|
|
1086 | const char *key_delete; |
|
|
1087 | #endif |
|
|
1088 | struct mouse_event MEvent; |
1071 | struct mouse_event MEvent; |
1089 | XComposeStatus compose; |
1072 | XComposeStatus compose; |
1090 | ttymode_t tio; |
1073 | ttymode_t tio; |
1091 | row_col_t oldcursor; |
1074 | row_col_t oldcursor; |
1092 | #ifdef HAVE_BG_PIXMAP |
1075 | #ifdef HAVE_BG_PIXMAP |
… | |
… | |
1398 | { |
1381 | { |
1399 | if (set) |
1382 | if (set) |
1400 | options[opt >> 3] |= (1 << (opt & 7)); |
1383 | options[opt >> 3] |= (1 << (opt & 7)); |
1401 | else |
1384 | else |
1402 | options[opt >> 3] &= ~(1 << (opt & 7)); |
1385 | options[opt >> 3] &= ~(1 << (opt & 7)); |
|
|
1386 | } |
|
|
1387 | |
|
|
1388 | void PrivMode (int set, unsigned bit) NOTHROW |
|
|
1389 | { |
|
|
1390 | if (set) |
|
|
1391 | priv_modes |= bit; |
|
|
1392 | else |
|
|
1393 | priv_modes &= ~bit; |
1403 | } |
1394 | } |
1404 | |
1395 | |
1405 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; |
1396 | void scr_blank_line (line_t &l, unsigned int col, unsigned int width, rend_t efs) const NOTHROW; |
1406 | void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; |
1397 | void scr_blank_screen_mem (line_t &l, rend_t efs) const NOTHROW; |
1407 | int scr_scroll_text (int row1, int row2, int count) NOTHROW; |
1398 | int scr_scroll_text (int row1, int row2, int count) NOTHROW; |
… | |
… | |
1517 | // xpm.C |
1508 | // xpm.C |
1518 | void get_window_origin (int &x, int &y); |
1509 | void get_window_origin (int &x, int &y); |
1519 | Pixmap get_pixmap_property (int prop_id); |
1510 | Pixmap get_pixmap_property (int prop_id); |
1520 | }; |
1511 | }; |
1521 | |
1512 | |
1522 | /* |
|
|
1523 | ***************************************************************************** |
|
|
1524 | * PROTOTYPES |
|
|
1525 | ***************************************************************************** |
|
|
1526 | */ |
|
|
1527 | #ifdef PROTOTYPES |
|
|
1528 | # define __PROTO(p) p |
|
|
1529 | #else |
|
|
1530 | # define __PROTO(p) () |
|
|
1531 | #endif |
|
|
1532 | |
|
|
1533 | #endif /* _RXVT_H_ */ |
1513 | #endif /* _RXVT_H_ */ |
1534 | |
1514 | |